Freigeben über


AssistantsClient.UpdateMessageAsync Method

Definition

Modifies an existing message on an existing thread.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.OpenAI.Assistants.ThreadMessage>> UpdateMessageAsync (string threadId, string messageId, System.Collections.Generic.IDictionary<string,string> metadata = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateMessageAsync : string * string * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.OpenAI.Assistants.ThreadMessage>>
override this.UpdateMessageAsync : string * string * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.OpenAI.Assistants.ThreadMessage>>
Public Overridable Function UpdateMessageAsync (threadId As String, messageId As String, Optional metadata As IDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ThreadMessage))

Parameters

threadId
String

The ID of the thread containing the specified message to modify.

messageId
String

The ID of the message to modify on the specified thread.

metadata
IDictionary<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

threadId or messageId is null.

threadId or messageId is an empty string, and was expected to be non-empty.

Applies to