I was trying to import memory using the method displayed in docs
from crewai import Memory
I got this error
Traceback (most recent call last):File “C:\Users\yugni\Desktop\Stratzi Chatbot\Crewai_implementation\flow_with_memory.py”, line 10, in from crewai import MemoryImportError: cannot import name ‘Memory’ from ‘crewai’ (C:\Users\yugni\Desktop\Stratzi Chatbot\chatbot\Lib\site-packages\crewai_init_.py). Did you mean: ‘memory’?
I tried importing using
from crewai import memory
But I was unable to create an object using it
Then I checked the class inside my vs code and found a complete different implementation with distinct types of memories instead of an unified memory
from crewai.memory.entity.entity_memory import EntityMemory
from crewai.memory.external.external_memory import ExternalMemory
from crewai.memory.long_term.long_term_memory import LongTermMemory
from crewai.memory.short_term.short_term_memory import ShortTermMemory
__all__ = [
"EntityMemory",
"ExternalMemory",
"LongTermMemory",
"ShortTermMemory",
]
And there was a complete different import statement/ implementation in the current repo
"""Memory module: unified Memory with LLM analysis and pluggable storage."""
from crewai.memory.encoding_flow import EncodingFlow
from crewai.memory.memory_scope import MemoryScope, MemorySlice
from crewai.memory.types import (
MemoryMatch,
MemoryRecord,
ScopeInfo,
compute_composite_score,
embed_text,
embed_texts,
)
from crewai.memory.unified_memory import Memory
__all__ = [
"EncodingFlow",
"Memory",
"MemoryMatch",
"MemoryRecord",
"MemoryScope",
"MemorySlice",
"ScopeInfo",
"compute_composite_score",
"embed_text",
"embed_texts",
]
I also updated the crewai version, but am still getting the same issues