Defined in: component-tool.ts:28
Exposes a component as a tool. The component runs in standalone mode through run().
Implements
Constructors
Constructor
new ComponentTool(config): ComponentTool;
Defined in: component-tool.ts:37
Parameters
| Parameter | Type |
|---|---|
config |
ComponentToolConfig |
Returns
ComponentTool
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
description |
readonly |
string |
Description that tells the model when to use the tool. | component-tool.ts:30 |
name |
readonly |
string |
Unique tool name. | component-tool.ts:29 |
parameters |
readonly |
ToolParameters | undefined |
JSON Schema of the arguments. | component-tool.ts:31 |
Methods
invoke()
invoke(args): Promise<unknown>;
Defined in: component-tool.ts:46
Runs the tool.
Parameters
| Parameter | Type | Description |
|---|---|---|
args |
Record<string, unknown> |
Arguments that match parameters. |
Returns
Promise<unknown>