Skip to content

Commit

Permalink
fix reset memory issue (#2182)
Browse files Browse the repository at this point in the history
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
  • Loading branch information
bhancockio and lorenzejay authored Feb 24, 2025
1 parent 8a75847 commit 78797c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/crewai/crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,11 +1278,11 @@ def reset_memories(self, command_type: str) -> None:
def _reset_all_memories(self) -> None:
"""Reset all available memory systems."""
memory_systems = [
("short term", self._short_term_memory),
("entity", self._entity_memory),
("long term", self._long_term_memory),
("task output", self._task_output_handler),
("knowledge", self.knowledge),
("short term", getattr(self, "_short_term_memory", None)),
("entity", getattr(self, "_entity_memory", None)),
("long term", getattr(self, "_long_term_memory", None)),
("task output", getattr(self, "_task_output_handler", None)),
("knowledge", getattr(self, "knowledge", None)),
]

for name, system in memory_systems:
Expand Down

0 comments on commit 78797c6

Please # to comment.