diff options
| author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-03-11 17:43:05 +0100 |
|---|---|---|
| committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-03-11 17:43:05 +0100 |
| commit | fa937182bc93aa2c6faadda80ea998cdfd479b4e (patch) | |
| tree | cba8e16edcccc6fd2932173484ac444cb79abea2 /src/client/views/nodes/chatbot/tools/NoTool.ts | |
| parent | cf91c46cfec6e3e36b9184764016f9c1b5c997d4 (diff) | |
| parent | 04669ffeb163688c7aefd7b5face7998252abdca (diff) | |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into DocCreatorMenu-work
Diffstat (limited to 'src/client/views/nodes/chatbot/tools/NoTool.ts')
| -rw-r--r-- | src/client/views/nodes/chatbot/tools/NoTool.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/views/nodes/chatbot/tools/NoTool.ts b/src/client/views/nodes/chatbot/tools/NoTool.ts new file mode 100644 index 000000000..40cc428b5 --- /dev/null +++ b/src/client/views/nodes/chatbot/tools/NoTool.ts @@ -0,0 +1,25 @@ +import { BaseTool } from './BaseTool'; +import { Observation } from '../types/types'; +import { ParametersType, ToolInfo } from '../types/tool_types'; + +const noToolParams = [] as const; + +type NoToolParamsType = typeof noToolParams; + +const noToolInfo: ToolInfo<NoToolParamsType> = { + name: 'noTool', + description: 'A placeholder tool that performs no action to use when no action is needed but to complete the loop.', + parameterRules: noToolParams, + citationRules: 'No citation needed.', +}; + +export class NoTool extends BaseTool<NoToolParamsType> { + constructor() { + super(noToolInfo); + } + + async execute(args: ParametersType<NoToolParamsType>): Promise<Observation[]> { + // Since there are no parameters, args will be an empty object + return [{ type: 'text', text: 'This tool does nothing.' }]; + } +} |
