import { Tool } from '../types'; export abstract class BaseTool = Record> implements Tool { constructor( public name: string, public description: string, public parameters: Record, public useRules: string, public briefSummary: string ) {} abstract execute(args: T): Promise; getActionRule(isCurrentTool: boolean): Record { if (isCurrentTool) { return { [this.name]: { name: this.name, useRules: this.useRules, description: this.description, parameters: this.parameters, }, }; } return { [this.name]: { description: 'This tool is not currently selected.', }, }; } }