/** * @file BaseTool.ts * @description This file defines the abstract BaseTool class, which serves as a blueprint * for tool implementations in the AI assistant system. Each tool has a name, description, * parameters, and citation rules. The BaseTool class provides a structure for executing actions * and retrieving action rules for use within the assistant's workflow. */ import { Tool } from '../types/types'; export abstract class BaseTool = Record> implements Tool { constructor( public name: string, public description: string, public parameters: Record, public citationRules: string, public briefSummary: string ) {} abstract execute(args: T): Promise; getActionRule(): Record { return { [this.name]: { name: this.name, citationRules: this.citationRules, description: this.description, parameters: this.parameters, }, }; } }