aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/agentsystem
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-11 16:03:29 -0500
committerbobzel <zzzman@gmail.com>2025-02-11 16:03:29 -0500
commit3e531aa898492cb05e25081f422bb59adab72e8e (patch)
tree29f23fa2619cf4d9aca71f455a0e5724c52bd57a /src/client/views/nodes/chatbot/agentsystem
parent1ef0a2d7835c9dfa1ec9fc298562f3a052b3e817 (diff)
enabled multi-select modification of text documents from topBar buttons. fixed diagram box layout and scrolling. fixed problem with createDoc tool where it would fail when it got an array. fixed formatting of chat box errors.
Diffstat (limited to 'src/client/views/nodes/chatbot/agentsystem')
-rw-r--r--src/client/views/nodes/chatbot/agentsystem/Agent.ts7
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}`);
}