aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/agentsystem
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2025-04-24 13:21:00 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2025-04-24 13:21:00 -0400
commit5ce2263849bfb901e276a4c5fc8ca2dbd8b80350 (patch)
tree34d4ac121cb13f141fcdb63325446d9c125813c4 /src/client/views/nodes/chatbot/agentsystem
parent321977e670cbdf10f6c49fc9071e3260a8bd4aae (diff)
attempt at linking docs but listing metadata doesn't work
Diffstat (limited to 'src/client/views/nodes/chatbot/agentsystem')
-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),