Share via


IFoundryToolInvocationResolver.ResolveAsync(Object, CancellationToken) Method

Definition

Resolves a tool definition to an invoker capable of executing it.

public System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tools.Runtime.Invocation.IFoundryToolInvoker> ResolveAsync(object tool, System.Threading.CancellationToken cancellationToken = default);
abstract member ResolveAsync : obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tools.Runtime.Invocation.IFoundryToolInvoker>
Public Function ResolveAsync (tool As Object, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IFoundryToolInvoker)

Parameters

tool
Object

The tool definition. This can be a FoundryTool instance or a dictionary-based facade that will be converted to a FoundryTool using FoundryToolFactory.

cancellationToken
CancellationToken

The cancellation token.

Returns

A task representing the asynchronous operation. The task result contains the tool invoker.

Exceptions

Thrown when the tool cannot be resolved to an invoker.

Applies to