aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/agentsystem/Agent.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/chatbot/agentsystem/Agent.ts')
-rw-r--r--src/client/views/nodes/chatbot/agentsystem/Agent.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/nodes/chatbot/agentsystem/Agent.ts b/src/client/views/nodes/chatbot/agentsystem/Agent.ts
index 5af021dbf..c021d141e 100644
--- a/src/client/views/nodes/chatbot/agentsystem/Agent.ts
+++ b/src/client/views/nodes/chatbot/agentsystem/Agent.ts
@@ -66,10 +66,12 @@ export class Agent {
history: () => string,
csvData: () => { filename: string; id: string; text: string }[],
addLinkedUrlDoc: (url: string, id: string) => void,
+ getLinkedUrlDocId: (url: string) => string[],
createImage: (result: Upload.FileInformation & Upload.InspectionResults, options: DocumentOptions) => void,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
createCSVInDash: (url: string, title: string, id: string, data: string) => void,
- chatBox: ChatBox
+ chatBox: ChatBox,
+ docManager: AgentDocumentManager
) {
// Initialize OpenAI client with API key from environment
this.client = new OpenAI({ apiKey: process.env.OPENAI_KEY, dangerouslyAllowBrowser: true });
@@ -77,14 +79,14 @@ export class Agent {
this._history = history;
this._summaries = summaries;
this._csvData = csvData;
- this._docManager = new AgentDocumentManager(chatBox);
+ this._docManager = docManager;
// Define available tools for the assistant
this.tools = {
calculate: new CalculateTool(),
rag: new RAGTool(this.vectorstore),
dataAnalysis: new DataAnalysisTool(csvData),
- websiteInfoScraper: new WebsiteInfoScraperTool(addLinkedUrlDoc),
+ websiteInfoScraper: new WebsiteInfoScraperTool(getLinkedUrlDocId),
searchTool: new SearchTool(addLinkedUrlDoc),
noTool: new NoTool(),
//imageCreationTool: new ImageCreationTool(createImage),