chatgpt-web
chatgpt-web copied to clipboard
超过最大的token
ChatGPT error 400: { "error": { "message": "This model's maximum context length is 4096 tokens. However, you requested 4112 tokens (3112 in the messages, 1000 in the completion). Please reduce the length of the messages or completion.", "type": "invalid_request_error", "param": "messages", "code": "context_length_exceeded" } }
这个问题怎么解决?
这个没法解决,官方限制单次对话长度,只要用api就会这样
应该是持续在一个会话中对话导致的,可以新开一个对话来避免这个问题。
我觉得可以修改一下,比如超过最大,换一个话题等等,不需要提示这个错误的信息给用户