你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ThreadMessages.GetMessageAsync Method

Definition

Overloads

Name Description
GetMessageAsync(String, String, RequestContext)

[Protocol Method] Retrieves an existing message.

GetMessageAsync(String, String, CancellationToken)

Retrieves an existing message.

GetMessageAsync(String, String, RequestContext)

Source:
ThreadMessages.cs
Source:
ThreadMessages.cs

[Protocol Method] Retrieves an existing message.

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:
ThreadMessages.cs
Source:
ThreadMessages.cs

Retrieves an existing message.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Agents.Persistent.PersistentThreadMessage>> 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.Agents.Persistent.PersistentThreadMessage>>
override this.GetMessageAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Agents.Persistent.PersistentThreadMessage>>
Public Overridable Function GetMessageAsync (threadId As String, messageId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PersistentThreadMessage))

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