Class ToolController
Inheritance
ToolController
Assembly: Glitch9.AIDevKit.dll
public sealed class ToolController : IDisposable
Methods
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Declaration
Returns
|
Edit this page
View Source
Declaration
public void RegisterTool(Tool tool)
Parameters
| Type |
Name |
Description |
| Tool |
tool |
|
|
Edit this page
View Source
Declaration
public void RegisterToolDefinition(HostedToolDefinitionBase toolDef)
Parameters
|
Edit this page
View Source
Declaration
public void RegisterToolDefinitions(IEnumerable<HostedToolDefinitionBase> toolDefs)
Parameters
|
Edit this page
View Source
Declaration
public void RegisterToolExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput> executor) where TCall : ToolCall where TOutput : ToolOutput
Parameters
Type Parameters
| Name |
Description |
| TCall |
|
| TOutput |
|
|
Edit this page
View Source
Declaration
public void RegisterTools(IEnumerable<Tool> tools)
Parameters
|
Edit this page
View Source
Returns the top-K tools most relevant to the user message for semantic routing.
If EnableSemanticRouting is disabled, returns the full tool list.
Declaration
public UniTask<List<Tool>> RouteToolsAsync(string userMessage, int topK = 12, CancellationToken ct = default)
Parameters
Returns
|
Edit this page
View Source
Sets a new router, replacing the previous one.
If a previous router exists, unsubscribes it from the OnToolsChanged event.
Declaration
public void SetRouter(IToolRouter router)
Parameters
|
Edit this page
View Source
Allows user to manually submit a tool output.
Used when UnhandledToolCallBehaviour is SubmitToolOutput.
The output will be cached and included in the batch submission when the response is complete.
Declaration
public void SubmitUserToolOutput(string responseId, ToolOutput output)
Parameters
|
Edit this page
View Source
Declaration
public void UnregisterTool(Tool tool)
Parameters
| Type |
Name |
Description |
| Tool |
tool |
|
|
Edit this page
View Source
Declaration
public void UnregisterToolDefinition(HostedToolDefinitionBase toolDef)
Parameters
|
Edit this page
View Source
Declaration
public void UnregisterToolDefinitions(IEnumerable<HostedToolDefinitionBase> toolDefs)
Parameters
|
Edit this page
View Source
Declaration
public bool UnregisterToolExecutor<TCall, TOutput>(IToolCallExecutor<TCall, TOutput> executor) where TCall : ToolCall where TOutput : ToolOutput
Parameters
Returns
Type Parameters
| Name |
Description |
| TCall |
|
| TOutput |
|
|
Edit this page
View Source
Declaration
public void UnregisterTools(IEnumerable<Tool> tools)
Parameters
Implements
Extension Methods