IOpenAIClient.CreateThreadMessageAsync
IOpenAIClient.CreateThreadMessageAsync method
Creates a new message within a thread asynchronously.
public Task<ThreadMessageResponse> CreateThreadMessageAsync(string threadId,
ThreadMessageCreateRequest threadMessageRequest, CancellationToken? cancellationToken = default)
Parameter | Type | Description |
---|---|---|
threadId | String | The ID of the thread where the message will be created. |
threadMessageRequest | ThreadMessageCreateRequest | The request details for creating the message. |
cancellationToken | Nullable`1 | A token to cancel the operation. |
Return Value
A task that represents the asynchronous operation. The task result contains the response from the message creation.
Exceptions
exception | condition |
---|---|
AIClientException | Thrown when the thread Id is null or empty. |
See Also
- class ThreadMessageResponse
- class ThreadMessageCreateRequest
- interface IOpenAIClient
- namespace Aspose.Pdf.AI
- assembly Aspose.PDF