Requested tokens exceeded context window. #804
Unanswered
Doflamingoos
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The error is:
ValueError: Requested tokens (4539) exceed context window of 4096
Increasing CONTEXT_WINDOW_SIZE only delays the error by a few messages. My chunk_size is already 50-200.
I want to use LangChain's ConversationTokenBufferMemory or ConversationBufferWindowMemory to fix this but they do nothing.
The point is that I want to be able to repeatedly ask questions and I want the memory to store the last x messages or k tokens. I dont want to just delay the error for a few more messages.
Beta Was this translation helpful? Give feedback.
All reactions