blob: 40cc428b5b9774d5e56055499aa594d174e246ae (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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.' }];
    }
}
 |