IOpenAIClient.GetThreadAsync

IOpenAIClient.GetThreadAsync method

Retrieves details of a specific thread asynchronously.

public Task<ThreadResponse> GetThreadAsync(string threadId, 
    CancellationToken? cancellationToken = default)
ParameterTypeDescription
threadIdStringThe ID of the thread to retrieve.
cancellationTokenNullable`1A token to cancel the operation.

Return Value

A task that represents the asynchronous operation. The task result contains the details of the thread.

Exceptions

exceptioncondition
AIClientExceptionThrown when the thread Id is null or empty.

See Also