felixbade / assistant

Web UI for ChatGPT API. No back-end, mobile-friendly, continuously user-tested
https://assistant.bloat.app
ISC License
125 stars 25 forks source link

I can’t continue asking questions without reloading when I reached a limit. #70

Closed smon1127 closed 1 year ago

smon1127 commented 1 year ago

After a while of using the same windows without reloading I can’t continue asking questions without reloading. Any thoughts why this happens?

Error: This model's maximum context length is 4097 tokens. However, your messages resulted in 4137 tokens. Please reduce the length of the messages.

image
felixbade commented 1 year ago

This is a limitation of the ChatGPT API – the way it remembers old messages in the conversation is by sending the whole conversation every time with a new message. At some point, the conversation becomes too long to fit the token limit.

Since this also means that longer conversations cost more for each new message, it could make sense to have a configuration in assistant.bloat.app that only sends the latest x messages (say, default 10).

felixbade commented 1 year ago

Even though this is a limitation of the API, I added the bug label because this is unintuitive and should be addressed by the UI in some way or another.

felixbade commented 1 year ago

Now that there is a settings page, there could be a limit for how many last messages are sent to the AI.

felixbade commented 1 year ago

Fixed in v1.5.0