Class SingleToolCallExecutor<TCall, TOutput>
Single tool call executor implementation.
public sealed class SingleToolCallExecutor<TCall, TOutput> : IToolCallExecutor<TCall, TOutput> where TCall : ToolCall where TOutput : ToolOutput
Type Parameters
TCallTOutput
- Inheritance
-
objectSingleToolCallExecutor<TCall, TOutput>
- Implements
-
IToolCallExecutor<TCall, TOutput>
Constructors
SingleToolCallExecutor(string, Func<TCall, CancellationToken, UniTask<TOutput>>)
public SingleToolCallExecutor(string toolName, Func<TCall, CancellationToken, UniTask<TOutput>> executeAsync)
Parameters
toolNamestringexecuteAsyncFunc<TCall, CancellationToken, UniTask<TOutput>>
Methods
CanExecute(string)
public bool CanExecute(string toolName)
Parameters
toolNamestring
Returns
- bool
ExecuteAsync(TCall, CancellationToken)
public UniTask<TOutput> ExecuteAsync(TCall toolCall, CancellationToken ct = default)
Parameters
toolCallTCallctCancellationToken
Returns
- UniTask<TOutput>