Table of Contents

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

TCall
TOutput
Inheritance
object
SingleToolCallExecutor<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

toolName string
executeAsync Func<TCall, CancellationToken, UniTask<TOutput>>

Methods

CanExecute(string)

public bool CanExecute(string toolName)

Parameters

toolName string

Returns

bool

ExecuteAsync(TCall, CancellationToken)

public UniTask<TOutput> ExecuteAsync(TCall toolCall, CancellationToken ct = default)

Parameters

toolCall TCall
ct CancellationToken

Returns

UniTask<TOutput>