open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Clear messages on %reset instead of instantiating a new Interpreter

Open MikeBirdTech opened this issue 1 year ago • 1 comments

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

MikeBirdTech avatar Mar 19 '24 00:03 MikeBirdTech

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?

MikeBirdTech avatar Mar 19 '24 00:03 MikeBirdTech

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!

KillianLucas avatar Mar 19 '24 02:03 KillianLucas