diff --git a/src/hooks/useSubmit.ts b/src/hooks/useSubmit.ts index 28284ea..a798b9e 100644 --- a/src/hooks/useSubmit.ts +++ b/src/hooks/useSubmit.ts @@ -55,7 +55,7 @@ const useSubmit = () => { let stream; const messages = limitMessageTokens( chats[currentChatIndex].messages, - 4000 + chats[currentChatIndex].config.max_tokens ); if (messages.length === 0) throw new Error('Message exceed max token!');