From 6e8f05495dfcf7d64bdc424503f874fece85e291 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Thu, 10 Apr 2025 12:36:07 -0400 Subject: trying again --- src/client/views/nodes/chatbot/agentsystem/Agent.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/client/views/nodes/chatbot/agentsystem') diff --git a/src/client/views/nodes/chatbot/agentsystem/Agent.ts b/src/client/views/nodes/chatbot/agentsystem/Agent.ts index bab2081b3..b166254bb 100644 --- a/src/client/views/nodes/chatbot/agentsystem/Agent.ts +++ b/src/client/views/nodes/chatbot/agentsystem/Agent.ts @@ -8,7 +8,6 @@ import { StreamedAnswerParser } from '../response_parsers/StreamedAnswerParser'; import { BaseTool } from '../tools/BaseTool'; import { CalculateTool } from '../tools/CalculateTool'; //import { CreateAnyDocumentTool } from '../tools/CreateAnyDocTool'; -import { CreateDocTool } from '../tools/CreateDocumentTool'; import { DataAnalysisTool } from '../tools/DataAnalysisTool'; import { DocumentMetadataTool } from '../tools/DocumentMetadataTool'; import { ImageCreationTool } from '../tools/ImageCreationTool'; @@ -83,13 +82,8 @@ export class Agent { dataAnalysis: new DataAnalysisTool(csvData), websiteInfoScraper: new WebsiteInfoScraperTool(addLinkedUrlDoc), searchTool: new SearchTool(addLinkedUrlDoc), - // createCSV: new CreateCSVTool(createCSVInDash), noTool: new NoTool(), - imageCreationTool: new ImageCreationTool(createImage), - // createTextDoc: new CreateTextDocTool(addLinkedDoc), - // createDoc: new CreateDocTool(addLinkedDoc), - // createAnyDocument: new CreateAnyDocumentTool(addLinkedDoc), - // dictionary: new DictionaryTool(), + //imageCreationTool: new ImageCreationTool(createImage), documentMetadata: new DocumentMetadataTool(this), }; } @@ -103,7 +97,7 @@ export class Agent { * @param maxTurns The maximum number of turns to allow in the conversation. * @returns The final response from the assistant. */ - async askAgent(question: string, onProcessingUpdate: (processingUpdate: ProcessingInfo[]) => void, onAnswerUpdate: (answerUpdate: string) => void, maxTurns: number = 30): Promise { + async askAgent(question: string, onProcessingUpdate: (processingUpdate: ProcessingInfo[]) => void, onAnswerUpdate: (answerUpdate: string) => void, maxTurns: number = 50): Promise { console.log(`Starting query: ${question}`); const MAX_QUERY_LENGTH = 1000; // adjust the limit as needed @@ -470,7 +464,7 @@ export class Agent { actionInput.fieldValue = String(actionInput.fieldValue); } } - + // Handle fieldEdits parameter (for multiple field edits) if ('fieldEdits' in actionInput && actionInput.fieldEdits) { try { @@ -521,7 +515,7 @@ export class Agent { /** * Reinitializes the DocumentMetadataTool with a direct reference to the ChatBox instance. * This ensures that the tool can properly access the ChatBox document and find related documents. - * + * * @param chatBox The ChatBox instance to pass to the DocumentMetadataTool */ public reinitializeDocumentMetadataTool(chatBox: any): void { -- cgit v1.2.3-70-g09d2