AzureAIExtensions.CreateResponseAsync Method

Definition

Asynchronously creates a response for an existing project conversation and agent.

public static System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>> CreateResponseAsync(this OpenAI.Responses.ResponsesClient responseClient, Azure.AI.Extensions.OpenAI.ProjectConversation conversation, Azure.AI.Extensions.OpenAI.AgentReference agentRef, System.Threading.CancellationToken cancellationToken = default);
static member CreateResponseAsync : OpenAI.Responses.ResponsesClient * Azure.AI.Extensions.OpenAI.ProjectConversation * Azure.AI.Extensions.OpenAI.AgentReference * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<OpenAI.Responses.ResponseResult>>
<Extension()>
Public Function CreateResponseAsync (responseClient As ResponsesClient, conversation As ProjectConversation, agentRef As AgentReference, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ResponseResult))

Parameters

responseClient
OpenAI.Responses.ResponsesClient

The response client used to send the request.

conversation
ProjectConversation

The project conversation to continue.

agentRef
AgentReference

The agent that should create the response.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Task<ClientResult<OpenAI.Responses.ResponseResult>>

The created response result.

Applies to