From d2d14876c1266cacefc20f912d73881e7b289bc8 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Wed, 3 May 2023 13:53:05 +0800 Subject: [PATCH] change `max_tokens` from `null` to `undefined` issue #248 --- src/api/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/api.ts b/src/api/api.ts index 4713496..0989207 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -22,7 +22,7 @@ export const getChatCompletion = async ( body: JSON.stringify({ messages, ...config, - max_tokens: null, + max_tokens: undefined, }), }); if (!response.ok) throw new Error(await response.text()); @@ -51,7 +51,7 @@ export const getChatCompletionStream = async ( body: JSON.stringify({ messages, ...config, - max_tokens: null, + max_tokens: undefined, stream: true, }), });