From dc8bcdee20d5fd0eea1a962e865692eaed8e2413 Mon Sep 17 00:00:00 2001 From: Yule Hou <6761583+hyln9@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:04:39 +0800 Subject: [PATCH] fix: use official system message by default Fixing a typo in the default system message which sometimes causes weird problems, including failure to retrieve certain information. Additionally, using the official knowledge cutoff seems to help. --- src/chatgpt-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chatgpt-api.ts b/src/chatgpt-api.ts index f30b0b4..3768695 100644 --- a/src/chatgpt-api.ts +++ b/src/chatgpt-api.ts @@ -78,7 +78,7 @@ export class ChatGPTAPI { if (this._systemMessage === undefined) { const currentDate = new Date().toISOString().split('T')[0] - this._systemMessage = `You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possiboe.\nCurrent date: ${currentDate}\n` + this._systemMessage = `You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible.\nKnowledge cutoff: 2021-09-01\nCurrent date: ${currentDate}` } this._maxModelTokens = maxModelTokens