From f82343158f423fdca136a639ec61c1e8d93b5467 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Wed, 10 Jul 2024 18:13:44 -0400 Subject: trying to update RAG when new docs are added --- src/client/views/nodes/ChatBox/Agent.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/client/views/nodes/ChatBox/Agent.ts b/src/client/views/nodes/ChatBox/Agent.ts index cec5e1770..63363ab0b 100644 --- a/src/client/views/nodes/ChatBox/Agent.ts +++ b/src/client/views/nodes/ChatBox/Agent.ts @@ -41,6 +41,7 @@ export class Agent { } async askAgent(question: string, maxTurns: number = 8): Promise { + this.tools.rag = new RAGTool(this.vectorstore, this.vectorstore ? this.vectorstore.getSummaries() : 'No documents available.'); console.log(`Starting query: ${question}`); this.messages.push({ role: 'user', content: question }); const chatHistory = this.formatChatHistory(); -- cgit v1.2.3-70-g09d2