NextChat
NextChat copied to clipboard
[Bug] Setting `max_tokens` didn't work when using OpenAI models.
Bug Description
The payload of request didn't contains 'max_tokens'.
Steps to Reproduce
- Go to 'settings', and set max_tokens to any value.
- Open Chrome Developer Tools and switch to 'Network' tab.
- Apply a chat request.
Expected Behavior
The request should have key 'max_tokens'.
Screenshots
Deployment Method
- [ ] Docker
- [ ] Vercel
- [X] Server
Desktop OS
Windows 11
Desktop Browser
Chrome
Desktop Browser Version
124.0.6367.208
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/f55f04ab4f23fc5a5ac84aba0d2d926c557816c3/app/client/platforms/openai.ts#L119-L129 https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/discussions/3208