ChatClientAgentOptions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents metadata for a chat client agent, including its identifier, name, instructions, and description.
public sealed class ChatClientAgentOptions
type ChatClientAgentOptions = class
Public NotInheritable Class ChatClientAgentOptions
- Inheritance
-
ChatClientAgentOptions
Remarks
This class is used to encapsulate information about a chat client agent, such as its unique identifier, display name, operational instructions, and a descriptive summary. It can be used to store and transfer agent-related metadata within a chat application.
Constructors
| Name | Description |
|---|---|
| ChatClientAgentOptions() |
Initializes a new instance of the ChatClientAgentOptions class. |
Properties
| Name | Description |
|---|---|
| AIContextProviders |
Gets or sets the list of AIContextProvider instances to use for providing additional context for each agent run. |
| ChatHistoryProvider |
Gets or sets the ChatHistoryProvider instance to use for providing chat history for this agent. |
| ChatOptions |
Gets or sets the default chatOptions to use. |
| ClearOnChatHistoryProviderConflict |
Gets or sets a value indicating whether to set the ChatHistoryProvider to |
| Description |
Gets or sets the agent description. |
| EnableMessageInjection |
Gets or sets a value indicating whether to include a MessageInjectingChatClient in the chat client pipeline. |
| EnableNonApprovalRequiredFunctionBypassing |
Gets or sets a value indicating whether to store automatically approved function calls in the session state for tools that do not require approval when they are returned alongside tools that do. |
| Id |
Gets or sets the agent id. |
| Name |
Gets or sets the agent name. |
| RequirePerServiceCallChatHistoryPersistence |
Gets or sets a value indicating whether the ChatClientAgent should persist chat history after each individual service call within the FunctionInvokingChatClient loop, rather than at the end of the full agent run. |
| ThrowOnChatHistoryProviderConflict |
Gets or sets a value indicating whether an exception is thrown if the underlying AI service indicates that it manages chat history (for example, by returning a conversation id in the response), but a ChatHistoryProvider is configured for the agent. |
| UseProvidedChatClientAsIs |
Gets or sets a value indicating whether to use the provided IChatClient instance as is, without applying any default decorators. |
| WarnOnChatHistoryProviderConflict |
Gets or sets a value indicating whether to log a warning if the underlying AI service indicates that it manages chat history (for example, by returning a conversation id in the response), but a ChatHistoryProvider is configured for the agent. |
Methods
| Name | Description |
|---|---|
| Clone() |
Creates a new instance of ChatClientAgentOptions with the same values as this instance. |
Extension Methods
| Name | Description |
|---|---|
| WithCosmosDBChatHistoryProvider(ChatClientAgentOptions, CosmosClient, String, String, Func<AgentSession,CosmosChatHistoryProvider.State>) |
Configures the agent to use Cosmos DB for message storage with an existing CosmosClient. |
| WithCosmosDBChatHistoryProvider(ChatClientAgentOptions, String, String, String, Func<AgentSession,CosmosChatHistoryProvider.State>) |
Configures the agent to use Cosmos DB for message storage with connection string authentication. |
| WithCosmosDBChatHistoryProviderUsingManagedIdentity(ChatClientAgentOptions, String, String, String, TokenCredential, Func<AgentSession,CosmosChatHistoryProvider.State>) |
Configures the agent to use Cosmos DB for message storage with managed identity authentication. |