IOpenAIClient.CreateRunAsync

IOpenAIClient.CreateRunAsync method

Creates a run within a specified thread asynchronously.

public Task<RunResponse> CreateRunAsync(string threadId, RunCreateRequest runCreateRequest, 
    CancellationToken? cancellationToken = default)
ParameterTypeDescription
threadIdStringThe ID of the thread where the run will be created.
runCreateRequestRunCreateRequestThe request details for creating the run.
cancellationTokenNullable`1A token to cancel the operation.

Return Value

A task that represents the asynchronous operation. The task result contains the response from the run creation.

Exceptions

exceptioncondition
AIClientExceptionThrown when the thread Id is null or empty.

See Also