* refactor(api.ts): remove console.log statement

* fix(generateCommitMessageFromGitDiff.ts): increase MAX_REQ_TOKENS to 3900 to avoid exceeding OpenAI's limit
This commit is contained in:
di-sukharev
2023-03-07 22:37:13 +08:00
parent bf29c260ca
commit d561170519
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ const INIT_MESSAGES_PROMPT_LENGTH = INIT_MESSAGES_PROMPT.map(
(msg) => msg.content
).join('').length;
const MAX_REQ_TOKENS = 1000 - INIT_MESSAGES_PROMPT_LENGTH;
const MAX_REQ_TOKENS = 3900 - INIT_MESSAGES_PROMPT_LENGTH;
export const generateCommitMessageWithChatCompletion = async (
diff: string