cyberkaida / reverse-engineering-assistant

An AI assistant for reverse engineering tasks 👩‍💻
Apache License 2.0
165 stars 15 forks source link

Inference Provider exceptions terminate the chain of thought #56

Closed cyberkaida closed 1 month ago

cyberkaida commented 1 month ago

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