mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
Pr branch (#2312)
* Adjust checking for callable crew object. Changes back to how it was being done before. Fixes #2307 * Fix specific memory reset errors. When not initiated, the function should raise the "memory system is not initialized" RuntimeError. * Remove print statement * Fixes test case --------- Co-authored-by: Carlos Souza <carloshrsouza@gmail.com>
This commit is contained in:
@@ -1399,12 +1399,12 @@ class Crew(BaseModel):
|
||||
RuntimeError: If the specified memory system fails to reset
|
||||
"""
|
||||
reset_functions = {
|
||||
"long": (self._long_term_memory, "long term"),
|
||||
"short": (self._short_term_memory, "short term"),
|
||||
"entity": (self._entity_memory, "entity"),
|
||||
"knowledge": (self.knowledge, "knowledge"),
|
||||
"kickoff_outputs": (self._task_output_handler, "task output"),
|
||||
"external": (self._external_memory, "external"),
|
||||
"long": (getattr(self, "_long_term_memory", None), "long term"),
|
||||
"short": (getattr(self, "_short_term_memory", None), "short term"),
|
||||
"entity": (getattr(self, "_entity_memory", None), "entity"),
|
||||
"knowledge": (getattr(self, "knowledge", None), "knowledge"),
|
||||
"kickoff_outputs": (getattr(self, "_task_output_handler", None), "task output"),
|
||||
"external": (getattr(self, "_external_memory", None), "external"),
|
||||
}
|
||||
|
||||
memory_system, name = reset_functions[memory_type]
|
||||
|
||||
Reference in New Issue
Block a user