From 98d0bba3e59ab7ec9dfbf5e6c9c58e6ac1d22ae3 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Thu, 17 Oct 2024 17:41:47 -0400 Subject: added create text doc tool with font color and background color and fixed no tool --- src/client/views/nodes/chatbot/agentsystem/Agent.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 34e7cf5ea..df307bc21 100644 --- a/src/client/views/nodes/chatbot/agentsystem/Agent.ts +++ b/src/client/views/nodes/chatbot/agentsystem/Agent.ts @@ -15,7 +15,8 @@ import { AgentMessage, AssistantMessage, Observation, PROCESSING_TYPE, Processin import { Vectorstore } from '../vectorstore/Vectorstore'; import { getReactPrompt } from './prompts'; import { BaseTool } from '../tools/BaseTool'; -import { Parameter, ParametersType, Tool } from '../tools/ToolTypes'; +import { Parameter, ParametersType } from '../tools/ToolTypes'; +import { CreateTextDocTool } from '../tools/CreateTextDocumentTool'; dotenv.config(); @@ -54,6 +55,7 @@ export class Agent { history: () => string, csvData: () => { filename: string; id: string; text: string }[], addLinkedUrlDoc: (url: string, id: string) => void, + addLinkedTextDoc: (text_content: string, options: {}, id: string) => void, createCSVInDash: (url: string, title: string, id: string, data: string) => void ) { // Initialize OpenAI client with API key from environment @@ -71,7 +73,8 @@ export class Agent { websiteInfoScraper: new WebsiteInfoScraperTool(addLinkedUrlDoc), searchTool: new SearchTool(addLinkedUrlDoc), createCSV: new CreateCSVTool(createCSVInDash), - no_tool: new NoTool(), + noTool: new NoTool(), + createTextDoc: new CreateTextDocTool(addLinkedTextDoc), }; } -- cgit v1.2.3-70-g09d2