fix: max tokens bug

Fixes #100
This commit is contained in:
Jing Hua 2023-03-19 18:04:47 +08:00
parent 9f92cf5c70
commit e69e50a9a9

View file

@ -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,
}),
});