diff options
Diffstat (limited to 'src/client/views/nodes/chatbot/agentsystem')
| -rw-r--r-- | src/client/views/nodes/chatbot/agentsystem/Agent.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/chatbot/agentsystem/Agent.ts b/src/client/views/nodes/chatbot/agentsystem/Agent.ts index a7b34392b..b2b0c9aea 100644 --- a/src/client/views/nodes/chatbot/agentsystem/Agent.ts +++ b/src/client/views/nodes/chatbot/agentsystem/Agent.ts @@ -21,6 +21,7 @@ import { getReactPrompt } from './prompts'; import { ChatCompletionMessageParam } from 'openai/resources'; import { Doc } from '../../../../../fields/Doc'; import { parsedDoc } from '../chatboxcomponents/ChatBox'; +import { WebsiteInfoScraperTool } from '../tools/WebsiteInfoScraperTool'; //import { CreateTextDocTool } from '../tools/CreateTextDocumentTool'; dotenv.config(); @@ -77,11 +78,11 @@ export class Agent { calculate: new CalculateTool(), // rag: new RAGTool(this.vectorstore), dataAnalysis: new DataAnalysisTool(csvData), - // websiteInfoScraper: new WebsiteInfoScraperTool(addLinkedUrlDoc), + websiteInfoScraper: new WebsiteInfoScraperTool(addLinkedUrlDoc), searchTool: new SearchTool(addLinkedUrlDoc), // createCSV: new CreateCSVTool(createCSVInDash), noTool: new NoTool(), - //imageCreationTool: new ImageCreationTool(createImage), + imageCreationTool: new ImageCreationTool(createImage), // createTextDoc: new CreateTextDocTool(addLinkedDoc), createDoc: new CreateDocTool(addLinkedDoc), // createAnyDocument: new CreateAnyDocumentTool(addLinkedDoc), @@ -458,7 +459,7 @@ export class Agent { for (const param of this.tools[action].parameterRules) { // Check if the parameter is required and missing in the input - if (param.required && !(param.name in actionInput)) { + if (param.required && !(param.name in actionInput) && !this.tools[action].inputValidator(actionInput)) { throw new Error(`Missing required parameter: ${param.name}`); } |
