IOpenAIClient.DeleteThreadAsync

IOpenAIClient.DeleteThreadAsync method

Deletes an existing thread asynchronously.

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

Return Value

A task that represents the asynchronous operation. The task result contains the status of the delete operation.

Exceptions

exceptioncondition
AIClientExceptionThrown when the thread Id is null or empty.

See Also