diff options
| author | A.J. Shulman <Shulman.aj@gmail.com> | 2024-12-18 11:46:14 -0500 |
|---|---|---|
| committer | A.J. Shulman <Shulman.aj@gmail.com> | 2024-12-18 11:46:14 -0500 |
| commit | ad1e0cf62187e0f8bbb19b4720b7681585361de9 (patch) | |
| tree | 673dd63ddc1808e6e89dab5021c2136cbbe843c8 /src/client/views/nodes/chatbot/tools/CreateCSVTool.ts | |
| parent | 9e447814b551c352709296ae562f1f50480320f5 (diff) | |
better
Diffstat (limited to 'src/client/views/nodes/chatbot/tools/CreateCSVTool.ts')
| -rw-r--r-- | src/client/views/nodes/chatbot/tools/CreateCSVTool.ts | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/nodes/chatbot/tools/CreateCSVTool.ts b/src/client/views/nodes/chatbot/tools/CreateCSVTool.ts index 2cc513d6c..e8ef3fbfe 100644 --- a/src/client/views/nodes/chatbot/tools/CreateCSVTool.ts +++ b/src/client/views/nodes/chatbot/tools/CreateCSVTool.ts @@ -1,7 +1,7 @@ import { BaseTool } from './BaseTool'; import { Networking } from '../../../../Network'; import { Observation } from '../types/types'; -import { ParametersType } from '../types/tool_types'; +import { ParametersType, ToolInfo } from '../types/tool_types'; const createCSVToolParams = [ { @@ -20,17 +20,18 @@ const createCSVToolParams = [ type CreateCSVToolParamsType = typeof createCSVToolParams; +const createCSVToolInfo: ToolInfo<CreateCSVToolParamsType> = { + name: 'createCSV', + description: 'Creates a CSV file from the provided CSV string and saves it to the server with a unique identifier, returning the file URL and UUID.', + citationRules: 'No citation needed.', + parameterRules: createCSVToolParams, +}; + export class CreateCSVTool extends BaseTool<CreateCSVToolParamsType> { private _handleCSVResult: (url: string, filename: string, id: string, data: string) => void; constructor(handleCSVResult: (url: string, title: string, id: string, data: string) => void) { - super( - 'createCSV', - 'Creates a CSV file from raw CSV data and saves it to the server', - createCSVToolParams, - 'Provide a CSV string and a filename to create a CSV file.', - 'Creates a CSV file from the provided CSV string and saves it to the server with a unique identifier, returning the file URL and UUID.' - ); + super(createCSVToolInfo); this._handleCSVResult = handleCSVResult; } |
