You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After playing with the cat for a while, looks like the context memory gets full.
The frontend message is
"Something went wrong while sending your message. Please try refreshing the page"
but the backend log reports
openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, your messages resulted in 12341 tokens. Please reduce the length of the messages.
I am not in the code yet enough to propose a pull but from the user perspective my suggestion are
To make the frontend message more explicit (e.g, The context memory exceeded its maximum size, please remove something) and then the user shall do it in some way, e.g. via the endpoint mentioned here .
To inform the user that the memory is exceeded and then automatically remove the oldest memories and reiterate the query. The criterion to remove memories could also be flexible, e.g. remove the oldest, remove the ones closer to a given token.
The text was updated successfully, but these errors were encountered:
Thank you for signaling @mallibus !
We planned to contain prompt size by using summarization (issue #16).
Hopefully memories management will be customizable via plugin, so you can do what you want.
I'm leaving this issue open and editing the title for your second point, better error information.
pieroit
changed the title
Manage context length limit
Reporto in frontend the specific server error
Mar 27, 2023
pieroit
changed the title
Reporto in frontend the specific server error
Report in frontend the specific server error
Mar 27, 2023
After playing with the cat for a while, looks like the context memory gets full.
The frontend message is
"Something went wrong while sending your message. Please try refreshing the page"
but the backend log reports
openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, your messages resulted in 12341 tokens. Please reduce the length of the messages.
I am not in the code yet enough to propose a pull but from the user perspective my suggestion are
The text was updated successfully, but these errors were encountered: