feat: made program reset LLM #39
Reference in New Issue
Block a user
Delete Branch "feat/program-reset-llm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implemented the feature where the LLM history is cleared whenever the program is run (meaning a program is sent via the UI).
For testing, after you pulled this branch, in src/control_backend/agents/llm_agent.py
temporarily replace the elif statement at line 55 with this one:
elif msg.sender == settings.agent_settings.bdi_program_manager_name:
if msg.body == "clear_history":
self.logger.debug("Clearing conversation history as requested by Program Manager.")
self.logger.debug(self.history)
self.history.clear()
self.logger.debug(self.history)
Manual testing (best if you have some (L)LM available:
- if you don't have a (L)LM running, both lists will be empty
Further verifications:
- bdi_program_manager is only 88% covered, but this was 86% before (wrote tests only for the newly added code)
assigned to @8464960
marked the checklist item Start this cb as completed
marked the checklist item Start ri and UI (dev) as completed
marked the checklist item Talk with the (L)LM to create some history as completed
marked the checklist item in the UI, go to editor and press "run program" as completed
marked the checklist item observe the logs (either in UI or in terminal of cb) as completed
marked the checklist item If your (L)LM has some history acquired you should see the history logged and then after an empty list as completed
marked the checklist item Style checks pass as completed
marked the checklist item Pipeline (tests) pass as completed
marked the checklist item Documentation is up to date as completed
marked the checklist item Tests are up to date (new code is covered) as completed
This description is a bit ambiguous. Now it sounds like it sends an empty string or empty list to replace the current history. I would recommend something like "Sends a message to the LLM Agent instructing it to clear its history."
approved this merge request
requested review from @s.o.h.luijkx
approved this merge request
Good catch, should be good now!
resolved all threads
mentioned in commit
4c20656c75