IOpenAIClient.RunAndGetAssistantResponseAsync

IOpenAIClient.RunAndGetAssistantResponseAsync method

Runs the assistant with the specified threadId and runCreateRequest, and asynchronously gets the assistant response.

public Task<string> RunAndGetAssistantResponseAsync(string threadId, 
    RunCreateRequest runCreateRequest, CancellationToken? cancellationToken)
ParameterTypeDescription
threadIdStringThe ID of the thread.
runCreateRequestRunCreateRequestThe run creation request.
cancellationTokenNullable`1The cancellation token (optional).

Return Value

A task representing the asynchronous operation with the assistant response string.

See Also