aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/Agent.ts
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-07-22 13:20:36 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2024-07-22 13:20:36 -0400
commit56f6637e9d9052c4bc7724d2713573ac67141631 (patch)
treebf6f83f911c29633c37cc453313acb03e6c95a84 /src/client/views/nodes/ChatBox/Agent.ts
parente7b7f7000534200d75f3519ffb13d5b22dbc5481 (diff)
works decently well
Diffstat (limited to 'src/client/views/nodes/ChatBox/Agent.ts')
-rw-r--r--src/client/views/nodes/ChatBox/Agent.ts4
1 files changed, 2 insertions, 2 deletions
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<string> {
+ async askAgent(question: string, maxTurns: number = 20): Promise<string> {
console.log(`Starting query: ${question}`);
this.messages.push({ role: 'user', content: question });
const chatHistory = this._history();