Clear messages on %reset instead of instantiating a new Interpreter
Describe the changes you have made:
Instead of self.__init__() where all parameters are cleared, now self.messages =[] is ran, which will clear all the messages of the conversation but will preserve the parameters, such as api_base, api_key, and more.
Outstanding question
This does not clear the conversation history when conversation_history=True. That can be added easily. Is that expected behaviour?
Reference any relevant issues (e.g. "Fixes #000"):
https://github.com/KillianLucas/open-interpreter/issues/1090
Pre-Submission Checklist (optional but appreciated):
- [x] I have included relevant documentation updates (stored in /docs)
- [x] I have read
docs/CONTRIBUTING.md - [x] I have read
docs/ROADMAP.md
OS Tests (optional but appreciated):
- [ ] Tested on Windows
- [x] Tested on MacOS
- [ ] Tested on Linux
I wanted to highlight the outstanding question
This does not clear the conversation history when conversation_history=True. That can be added easily. Is that expected behaviour?
Great work Mike! I think it's fine that it doesn't clear the history—it's more like opening a new chat. Let me know if you feel the other way. Merged!