From 56f6637e9d9052c4bc7724d2713573ac67141631 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Mon, 22 Jul 2024 13:20:36 -0400 Subject: works decently well --- src/client/views/nodes/ChatBox/Agent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/views/nodes/ChatBox/Agent.ts') diff --git a/src/client/views/nodes/ChatBox/Agent.ts b/src/client/views/nodes/ChatBox/Agent.ts index ca1b5c60c..b9d137270 100644 --- a/src/client/views/nodes/ChatBox/Agent.ts +++ b/src/client/views/nodes/ChatBox/Agent.ts @@ -22,7 +22,7 @@ export class Agent { private _summaries: () => string; constructor(_vectorstore: Vectorstore, summaries: () => string, history: () => string) { - this.client = new OpenAI({ apiKey: process.env.OPENAI_KEY, dangerouslyAllowBrowser: true }); + this.client = new OpenAI({ apiKey: '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', dangerouslyAllowBrowser: true }); this.vectorstore = _vectorstore; this._history = history; this._summaries = summaries; @@ -34,7 +34,7 @@ export class Agent { }; } - async askAgent(question: string, maxTurns: number = 10): Promise { + async askAgent(question: string, maxTurns: number = 20): Promise { console.log(`Starting query: ${question}`); this.messages.push({ role: 'user', content: question }); const chatHistory = this._history(); -- cgit v1.2.3-70-g09d2