Table of Contents

Class ToolCallController

public sealed class ToolCallController
Inheritance
object
ToolCallController

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

context IToolContext
imageController ImageController
setStatus SetStatusDelegate
registerTools RegisterToolsDelegate
resetToReadyState ResetToReadyStateDelegate
pushOutputMessage PushOutputMessageDelegate
toolCallHandler IToolCallHandler
errorHandler IErrorHandler
logger ILogger

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

e ToolCallEvent

Returns

UniTask

HandleUnhandledToolCall(ToolCall, string)

public void HandleUnhandledToolCall(ToolCall toolCall, string reason)

Parameters

toolCall ToolCall
reason string

RegisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput>)

public void RegisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput> executor) where TCall : ToolCall where TOutput : ToolOutput

Parameters

executor IToolCallExecutor<TCall, TOutput>

Type Parameters

TCall
TOutput

SetPendingToolCallResponse(Response, UniTaskCompletionSource<Response>)

public void SetPendingToolCallResponse(Response response, UniTaskCompletionSource<Response> responseTcs)

Parameters

response Response
responseTcs UniTaskCompletionSource<Response>

UnregisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput>)

public bool UnregisterToolCallExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput> executor) where TCall : ToolCall where TOutput : ToolOutput

Parameters

executor IToolCallExecutor<TCall, TOutput>

Returns

bool

Type Parameters

TCall
TOutput

Events

onUnhandledToolCall

public event Action<ToolCall> onUnhandledToolCall

Event Type

Action<ToolCall>