When the model requests a large amount of data, it can be bigger than the model's context window. We should return this exception to the model and tell it to reduce the page size or continue without that tool response.
Right now it throws an exception and aborts the chain.
We need to catch the right exception, add response to the history and then continue the chain of thoughts.
When an API error happens we reach the Exception handler here:
When the model requests a large amount of data, it can be bigger than the model's context window. We should return this exception to the model and tell it to reduce the page size or continue without that tool response.
Right now it throws an exception and aborts the chain.
We need to catch the right exception, add response to the history and then continue the chain of thoughts.
When an API error happens we reach the
Exception
handler here:https://github.com/cyberkaida/reverse-engineering-assistant/blob/0bb127044cbd071d79c4205c5a8d18a5013e522a/reverse-engineering-assistant/reverse_engineering_assistant/assistant.py#L396