AgentInvocationBase.InvokeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes the agent asynchronously and returns a complete response.
public System.Threading.Tasks.Task<Azure.AI.AgentServer.Contracts.Generated.Responses.Response> InvokeAsync(Azure.AI.AgentServer.Contracts.Generated.Responses.CreateResponseRequest request, Azure.AI.AgentServer.Responses.Invocation.AgentInvocationContext context, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeAsync : Azure.AI.AgentServer.Contracts.Generated.Responses.CreateResponseRequest * Azure.AI.AgentServer.Responses.Invocation.AgentInvocationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Contracts.Generated.Responses.Response>
override this.InvokeAsync : Azure.AI.AgentServer.Contracts.Generated.Responses.CreateResponseRequest * Azure.AI.AgentServer.Responses.Invocation.AgentInvocationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Contracts.Generated.Responses.Response>
Public Function InvokeAsync (request As CreateResponseRequest, context As AgentInvocationContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- request
- CreateResponseRequest
The create response request.
- context
- AgentInvocationContext
The agent invocation context.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
The response from the agent.