Class ToolCallController
public sealed class ToolCallController
- Inheritance
-
objectToolCallController
Constructors
ToolCallController(IToolContext, ImageController, SetStatusDelegate, RegisterToolsDelegate, ResetToReadyStateDelegate, PushOutputMessageDelegate, IToolCallHandler, IErrorHandler, ILogger)
public ToolCallController(IToolContext context, ImageController imageController, SetStatusDelegate setStatus, RegisterToolsDelegate registerTools, ResetToReadyStateDelegate resetToReadyState, PushOutputMessageDelegate pushOutputMessage, IToolCallHandler toolCallHandler, IErrorHandler errorHandler, ILogger logger)
Parameters
contextIToolContextimageControllerImageControllersetStatusSetStatusDelegateregisterToolsRegisterToolsDelegateresetToReadyStateResetToReadyStateDelegatepushOutputMessagePushOutputMessageDelegatetoolCallHandlerIToolCallHandlererrorHandlerIErrorHandlerloggerILogger
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
HandleEventAsync(ToolCallEvent)
public UniTask HandleEventAsync(ToolCallEvent e)
Parameters
Returns
- UniTask
HandleUnhandledToolCall(ToolCall, string)
public void HandleUnhandledToolCall(ToolCall toolCall, string reason)
Parameters
toolCallToolCallreasonstring
RegisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput>)
public void RegisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput> executor) where TCall : ToolCall where TOutput : ToolOutput
Parameters
executorIToolCallExecutor<TCall, TOutput>
Type Parameters
TCallTOutput
SetPendingToolCallResponse(Response, UniTaskCompletionSource<Response>)
public void SetPendingToolCallResponse(Response response, UniTaskCompletionSource<Response> responseTcs)
Parameters
UnregisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput>)
public bool UnregisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput> executor) where TCall : ToolCall where TOutput : ToolOutput
Parameters
executorIToolCallExecutor<TCall, TOutput>
Returns
- bool
Type Parameters
TCallTOutput
Events
onUnhandledToolCall
public event Action<ToolCall> onUnhandledToolCall
Event Type
- Action<ToolCall>