Compartilhar via


AgentsClient.GetMessage Method

Definition

Overloads

GetMessage(String, String, CancellationToken)

Gets an existing message from an existing thread.

GetMessage(String, String, RequestContext)

[Protocol Method] Gets an existing message from an existing thread.

GetMessage(String, String, CancellationToken)

Source:
AgentsClient.cs

Gets an existing message from an existing thread.

public virtual Azure.Response<Azure.AI.Projects.ThreadMessage> GetMessage (string threadId, string messageId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessage : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Projects.ThreadMessage>
override this.GetMessage : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Projects.ThreadMessage>
Public Overridable Function GetMessage (threadId As String, messageId As String, Optional cancellationToken As CancellationToken = Nothing) As 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

GetMessage(String, String, RequestContext)

Source:
AgentsClient.cs

[Protocol Method] Gets an existing message from an existing thread.

public virtual Azure.Response GetMessage (string threadId, string messageId, Azure.RequestContext context);
abstract member GetMessage : string * string * Azure.RequestContext -> Azure.Response
override this.GetMessage : string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetMessage (threadId As String, messageId As String, context As RequestContext) As 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