anse-app / chatgpt-demo

Minimal web UI for ChatGPT.
https://chatgpt.ddiu.me
MIT License
8.01k stars 3.81k forks source link

context_length_exceeded #309

Closed zdjjj closed 1 year ago

zdjjj commented 1 year ago

Describe the bug

image

聊一会就会出现token报错提示,旧版本不会

Reproduction

production

System Info

18

Used Package Manager

npm

Validations

ddiu8081 commented 1 year ago

Are you having too long a conversation? The error message has been given in the screenshot that the model's maximum context length is 4097 tokens. Please try clearing the history message.

zdjjj commented 1 year ago

get 感谢大佬

irmowan commented 1 year ago

Are you having too long a conversation? The error message has been given in the screenshot that the model's maximum context length is 4097 tokens. Please try clearing the history message.

If I cleared the history message, the model will lose all the history. Maybe use a Queue to shift the messages? So that I can see the whole chat history while only part of them will be sent to the model to get the next reply.

lianliankan007 commented 1 year ago

I agree with the brother upstairs. If the clean button is used, my browsing history will be lost. I hope to add a function to cache browsing history based on the systeam role ID.

iRedScarf commented 1 year ago

I often encounter this problem. I think maybe I can consider setting a context upper limit, or just use Anse instead.