AgentsClient.GetMessageAsync 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
GetMessageAsync(String, String, RequestContext) |
[Protocol Method] Gets an existing message from an existing thread.
|
GetMessageAsync(String, String, CancellationToken) |
Gets an existing message from an existing thread. |
GetMessageAsync(String, String, RequestContext)
- Source:
- AgentsClient.cs
[Protocol Method] Gets an existing message from an existing thread.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetMessageAsync(String, String, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> GetMessageAsync (string threadId, string messageId, Azure.RequestContext context);
abstract member GetMessageAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetMessageAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetMessageAsync (threadId As String, messageId As String, context As RequestContext) As Task(Of Response)
Parameters
- threadId
- String
Identifier of the thread.
- messageId
- String
Identifier of the message.
- 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
or messageId
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
GetMessageAsync(String, String, CancellationToken)
- Source:
- AgentsClient.cs
Gets an existing message from an existing thread.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.ThreadMessage>> GetMessageAsync (string threadId, string messageId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessageAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.ThreadMessage>>
override this.GetMessageAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.ThreadMessage>>
Public Overridable Function GetMessageAsync (threadId As String, messageId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ThreadMessage))
Parameters
- threadId
- String
Identifier of the thread.
- messageId
- String
Identifier of the message.
- 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