Share via


PersistentAgentsAdministrationClient.UpdateAgent Method

Definition

Modifies an existing agent.

public virtual Azure.Response<Azure.AI.Agents.Persistent.PersistentAgent> UpdateAgent(string assistantId, string model = default, string name = default, string description = default, string instructions = default, System.Collections.Generic.IEnumerable<Azure.AI.Agents.Persistent.ToolDefinition> tools = default, Azure.AI.Agents.Persistent.ToolResources toolResources = default, float? temperature = default, float? topP = default, BinaryData responseFormat = default, System.Collections.Generic.IReadOnlyDictionary<string,string> metadata = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateAgent : string * string * string * string * string * seq<Azure.AI.Agents.Persistent.ToolDefinition> * Azure.AI.Agents.Persistent.ToolResources * Nullable<single> * Nullable<single> * BinaryData * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Agents.Persistent.PersistentAgent>
override this.UpdateAgent : string * string * string * string * string * seq<Azure.AI.Agents.Persistent.ToolDefinition> * Azure.AI.Agents.Persistent.ToolResources * Nullable<single> * Nullable<single> * BinaryData * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Agents.Persistent.PersistentAgent>
Public Overridable Function UpdateAgent (assistantId As String, Optional model As String = Nothing, Optional name As String = Nothing, Optional description As String = Nothing, Optional instructions As String = Nothing, Optional tools As IEnumerable(Of ToolDefinition) = Nothing, Optional toolResources As ToolResources = Nothing, Optional temperature As Nullable(Of Single) = Nothing, Optional topP As Nullable(Of Single) = Nothing, Optional responseFormat As BinaryData = Nothing, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PersistentAgent)

Parameters

assistantId
String

The ID of the agent to modify.

model
String

The ID of the model to use.

name
String

The modified name for the agent to use.

description
String

The modified description for the agent to use.

instructions
String

The modified system instructions for the new agent to use.

tools
IEnumerable<ToolDefinition>

The modified collection of tools to enable for the agent.

toolResources
ToolResources

A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

temperature
Nullable<Single>

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.

topP
Nullable<Single>

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.

responseFormat
BinaryData

The response format of the tool calls used by this agent.

metadata
IReadOnlyDictionary<String,String>

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

assistantId is null.

assistantId is an empty string, and was expected to be non-empty.

Applies to