Overview / Tool
Tool
Extends
DynamicStructuredTool<typeoftoolSchema>
Constructors
new Tool()
new Tool(
name,description,fn,options?):Tool
Parameters
| Parameter | Type |
|---|---|
name | string |
description | string |
fn | ToolFun |
options? | ToolOptions |
Returns
Overrides
DynamicStructuredTool<typeof toolSchema>.constructor
Properties
| Property | Type |
|---|---|
startExamples | string[] |
Accessors
active
Get Signature
get active():
boolean
Returns
boolean
Set Signature
set active(
active):void
Parameters
| Parameter | Type |
|---|---|
active | boolean |
Returns
void
Methods
assignCat()
assignCat(
cat):Tool
Parameters
| Parameter | Type |
|---|---|
cat | StrayCat |
Returns
invoke()
invoke(
input,config?):Promise<string>
Invokes the tool with the provided input and configuration.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | {} | The input for the tool. |
config? | RunnableConfig | Optional configuration for the tool. |
Returns
Promise<string>
A Promise that resolves with a string.
Overrides
DynamicStructuredTool.invoke