AgentsClient.UpdateMessage Method
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.
Overloads
UpdateMessage(String, String, RequestContent, RequestContext) |
[Protocol Method] Modifies an existing message on an existing thread.
|
UpdateMessage(String, String, IReadOnlyDictionary<String,String>, CancellationToken) |
Modifies an existing message on an existing thread. |
UpdateMessage(String, String, RequestContent, RequestContext)
- Source:
- AgentsClient.cs
[Protocol Method] Modifies an existing message on an existing thread.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler UpdateMessage(String, String, IReadOnlyDictionary<String,String>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response UpdateMessage (string threadId, string messageId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member UpdateMessage : string * string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.UpdateMessage : string * string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function UpdateMessage (threadId As String, messageId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response
Parameters
- threadId
- String
Identifier of the thread.
- messageId
- String
Identifier of the message.
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
threadId
, messageId
or content
is null.
threadId
or messageId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
UpdateMessage(String, String, IReadOnlyDictionary<String,String>, CancellationToken)
- Source:
- AgentsClient.cs
Modifies an existing message on an existing thread.
public virtual Azure.Response<Azure.AI.Projects.ThreadMessage> UpdateMessage (string threadId, string messageId, System.Collections.Generic.IReadOnlyDictionary<string,string> metadata = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateMessage : string * string * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Projects.ThreadMessage>
override this.UpdateMessage : string * string * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Projects.ThreadMessage>
Public Overridable Function UpdateMessage (threadId As String, messageId As String, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ThreadMessage)
Parameters
- threadId
- String
Identifier of the thread.
- messageId
- String
Identifier of the message.
- 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
threadId
or messageId
is null.
threadId
or messageId
is an empty string, and was expected to be non-empty.
Applies to
Azure SDK for .NET