aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts')
-rw-r--r--src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts b/src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts
index 97b9ee023..8c5e3d9cd 100644
--- a/src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts
+++ b/src/client/views/nodes/chatbot/tools/DataAnalysisTool.ts
@@ -1,5 +1,5 @@
import { Observation } from '../types/types';
-import { ParametersType } from '../types/tool_types';
+import { ParametersType, ToolInfo } from '../types/tool_types';
import { BaseTool } from './BaseTool';
const dataAnalysisToolParams = [
@@ -14,17 +14,18 @@ const dataAnalysisToolParams = [
type DataAnalysisToolParamsType = typeof dataAnalysisToolParams;
+const dataAnalysisToolInfo: ToolInfo<DataAnalysisToolParamsType> = {
+ name: 'dataAnalysis',
+ description: 'Provides the full CSV file text for your analysis based on the user query and the available CSV file(s).',
+ citationRules: 'No citation needed.',
+ parameterRules: dataAnalysisToolParams,
+};
+
export class DataAnalysisTool extends BaseTool<DataAnalysisToolParamsType> {
private csv_files_function: () => { filename: string; id: string; text: string }[];
constructor(csv_files: () => { filename: string; id: string; text: string }[]) {
- super(
- 'dataAnalysis',
- 'Analyzes and provides insights from one or more CSV files',
- dataAnalysisToolParams,
- 'Provide the name(s) of up to 3 CSV files to analyze based on the user query and whichever available CSV files may be relevant.',
- 'Provides the full CSV file text for your analysis based on the user query and the available CSV file(s).'
- );
+ super(dataAnalysisToolInfo);
this.csv_files_function = csv_files;
}