Condividi tramite


DeclarativeAgentDefinition Class

Definition

The prompt agent definition.

public class DeclarativeAgentDefinition : Azure.AI.Projects.Agents.ProjectsAgentDefinition, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.Agents.DeclarativeAgentDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.Agents.DeclarativeAgentDefinition>
type DeclarativeAgentDefinition = class
    inherit ProjectsAgentDefinition
    interface IJsonModel<DeclarativeAgentDefinition>
    interface IPersistableModel<DeclarativeAgentDefinition>
Public Class DeclarativeAgentDefinition
Inherits ProjectsAgentDefinition
Implements IJsonModel(Of DeclarativeAgentDefinition), IPersistableModel(Of DeclarativeAgentDefinition)
Inheritance
DeclarativeAgentDefinition
Implements

Constructors

Name Description
DeclarativeAgentDefinition(String)

Initializes a new instance of DeclarativeAgentDefinition.

Properties

Name Description
ContentFilterConfiguration

Configuration for Responsible AI (RAI) content filtering and safety features.

(Inherited from ProjectsAgentDefinition)
Instructions

A system (or developer) message inserted into the model's context.

Model

The model deployment to use for this agent.

ReasoningOptions
StructuredInputs

Set of structured inputs that can participate in prompt template substitution or tool argument bindings.

Temperature

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.

TextOptions
ToolChoice

How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

  • String.
  • OpenAI.InternalToolChoiceParam.
</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Tools

An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter.

TopP

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<DeclarativeAgentDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<DeclarativeAgentDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IJsonModel<ProjectsAgentDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions) (Inherited from ProjectsAgentDefinition)
IJsonModel<ProjectsAgentDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from ProjectsAgentDefinition)
IPersistableModel<DeclarativeAgentDefinition>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<DeclarativeAgentDefinition>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<DeclarativeAgentDefinition>.Write(ModelReaderWriterOptions)
IPersistableModel<ProjectsAgentDefinition>.Create(BinaryData, ModelReaderWriterOptions) (Inherited from ProjectsAgentDefinition)
IPersistableModel<ProjectsAgentDefinition>.GetFormatFromOptions(ModelReaderWriterOptions) (Inherited from ProjectsAgentDefinition)
IPersistableModel<ProjectsAgentDefinition>.Write(ModelReaderWriterOptions) (Inherited from ProjectsAgentDefinition)

Applies to