From e69e50a9a9a9d685cdf723f6838e0267a9758521 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Sun, 19 Mar 2023 18:04:47 +0800 Subject: [PATCH] fix: max tokens bug Fixes #100 --- src/api/api.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/api.ts b/src/api/api.ts index 9acd160..bc33969 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -17,6 +17,7 @@ export const getChatCompletion = async ( body: JSON.stringify({ messages, ...config, + max_tokens: null, }), }); if (!response.ok) throw new Error(await response.text()); @@ -42,6 +43,7 @@ export const getChatCompletionStream = async ( body: JSON.stringify({ messages, ...config, + max_tokens: null, stream: true, }), });