mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 22:23:59 +01:00
fix: max tokens bug
This commit is contained in:
parent
e0155e3f4f
commit
9f92cf5c70
|
@ -55,7 +55,7 @@ const useSubmit = () => {
|
||||||
let stream;
|
let stream;
|
||||||
const messages = limitMessageTokens(
|
const messages = limitMessageTokens(
|
||||||
chats[currentChatIndex].messages,
|
chats[currentChatIndex].messages,
|
||||||
4000
|
chats[currentChatIndex].config.max_tokens
|
||||||
);
|
);
|
||||||
if (messages.length === 0) throw new Error('Message exceed max token!');
|
if (messages.length === 0) throw new Error('Message exceed max token!');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue