IOpenAIClient.GetThreadMessagesAsync
IOpenAIClient.GetThreadMessagesAsync method
Retrieves a list of messages for a specific thread asynchronously.
public Task<ThreadMessageListResponse> GetThreadMessagesAsync(string threadId,
ThreadMessageListQueryParameters queryParameters = null,
CancellationToken? cancellationToken = default)
Parameter | Type | Description |
---|---|---|
threadId | String | The ID of the thread to retrieve messages from. |
queryParameters | ThreadMessageListQueryParameters | Optional query parameters to filter the list of messages. |
cancellationToken | Nullable`1 | A token to cancel the operation. |
Return Value
A task that represents the asynchronous operation. The task result contains a list of thread messages.
Exceptions
exception | condition |
---|---|
AIClientException | Thrown when the thread Id is null or empty. |
See Also
- class ThreadMessageListResponse
- class ThreadMessageListQueryParameters
- interface IOpenAIClient
- namespace Aspose.Pdf.AI
- assembly Aspose.PDF