From cab0311e2fd9a6379628c000d11ddcd805e01f64 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Wed, 10 Jul 2024 16:16:26 -0400 Subject: first attempt at integrating everything --- src/client/views/nodes/ChatBox/ChatBot.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/client/views/nodes/ChatBox/ChatBot.ts (limited to 'src/client/views/nodes/ChatBox/ChatBot.ts') diff --git a/src/client/views/nodes/ChatBox/ChatBot.ts b/src/client/views/nodes/ChatBox/ChatBot.ts new file mode 100644 index 000000000..31b4ea9e3 --- /dev/null +++ b/src/client/views/nodes/ChatBox/ChatBot.ts @@ -0,0 +1,14 @@ +import { Agent } from './Agent'; +import { Vectorstore } from './vectorstore/VectorstoreUpload'; + +export class ChatBot { + private agent: Agent; + + constructor(vectorstore: Vectorstore) { + this.agent = new Agent(vectorstore); + } + + async ask(question: string): Promise { + return await this.agent.askAgent(question); + } +} -- cgit v1.2.3-70-g09d2