diff options
Diffstat (limited to 'src/client/views/nodes/ChatBox/tools')
| -rw-r--r-- | src/client/views/nodes/ChatBox/tools/BaseTool.ts | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/views/nodes/ChatBox/tools/BaseTool.ts b/src/client/views/nodes/ChatBox/tools/BaseTool.ts index 903161bd5..c7942e359 100644 --- a/src/client/views/nodes/ChatBox/tools/BaseTool.ts +++ b/src/client/views/nodes/ChatBox/tools/BaseTool.ts @@ -11,13 +11,20 @@ export abstract class BaseTool<T extends Record<string, any> = Record<string, an abstract execute(args: T): Promise<any>; - getActionRule(): Record<string, any> { + getActionRule(isCurrentTool: boolean): Record<string, any> { + if (isCurrentTool) { + return { + [this.name]: { + name: this.name, + useRules: this.useRules, + description: this.description, + parameters: this.parameters, + }, + }; + } return { [this.name]: { - name: this.name, - useRules: this.useRules, - description: this.description, - parameters: this.parameters, + description: 'This tool is not currently selected.', }, }; } |
