Context length limit
ViolentVotan opened this issue · comments
For OpenAI, a context length limitation would be great to control cost when using gpt4.
Currently, the maximum context is set at 4000 CHARACTERS, around 1300 tokens.
At every message, there is a context trimming function that deletes older messages to fit into 4000 characters limit.
The code is here:
Line 82 in 097f49d
I am going to change the scope of this ticket to make that 4000, currently hardcoded value, configurable from UI.
For now, the work around is to change the 4000 value in this line:
Line 91 in 097f49d