Partilhar via


OpenAIAssistantAgent.GetThreadMessagesAsync(String, CancellationToken) Method

Definition

Caution

Use the OpenAIAssistantAgentThread to retrieve messages instead. This method will be removed after May 1st 2025.

Gets messages for a specified thread.

[System.Obsolete("Use the OpenAIAssistantAgentThread to retrieve messages instead. This method will be removed after May 1st 2025.")]
public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent> GetThreadMessagesAsync(string threadId, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use the OpenAIAssistantAgentThread to retrieve messages instead. This method will be removed after May 1st 2025.")>]
member this.GetThreadMessagesAsync : string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent>
Public Function GetThreadMessagesAsync (threadId As String, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of ChatMessageContent)

Parameters

threadId
String

The thread identifier.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

An asynchronous enumeration of messages.

Attributes

Applies to