-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Save method not working for Memories #1453
Labels
bug
Something isn't working
Comments
Please upgrade to latest version 0.70.1 and see if it still occurs as your versions are quite far behind now |
Hey @theCyberTech I tried with latest version and I'm facing with ValueError Traceback (most recent call last)
File ~/Desktop/crewAI/src/crewai/memory/storage/rag_storage.py:59, in RAGStorage._initialize_app(self)
[58](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/src/crewai/memory/storage/rag_storage.py:58) try:
---> [59](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/src/crewai/memory/storage/rag_storage.py:59) self.collection = self.app.get_collection(
[60](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/src/crewai/memory/storage/rag_storage.py:60) name=self.type, embedding_function=self.embedder_config
[61](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/src/crewai/memory/storage/rag_storage.py:61) )
[62](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/src/crewai/memory/storage/rag_storage.py:62) except Exception:
File ~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:218, in Client.get_collection(self, name, id, embedding_function, data_loader)
[208](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:208) @override
[209](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:209) def get_collection(
[210](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:210) self,
(...)
[216](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:216) data_loader: Optional[DataLoader[Loadable]] = None,
[217](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:217) ) -> Collection:
--> [218](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:218) return self._server.get_collection(
[219](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:219) id=id,
[220](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:220) name=name,
[221](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:221) embedding_function=embedding_function,
[222](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:222) data_loader=data_loader,
[223](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:223) tenant=self.tenant,
[224](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:224) database=self.database,
[225](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/api/client.py:225) )
...
(...)
[235](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/db/mixins/sysdb.py:235) database=database,
[236](https://file+.vscode-resource.vscode-cdn.net/Users/devkhant/Desktop/crewAI/~/Desktop/crewAI/.venv/lib/python3.12/site-packages/chromadb/db/mixins/sysdb.py:236) )
UniqueConstraintError: Collection short_term already exists Seems issue is with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I was trying to use memory but found out that
save
function is not being called.Steps to Reproduce
Expected behavior
Here the
save
function of each memory i.e ShortTermMemory, LongTermMemory, EntityMemory should be called.Screenshots/Code snippets
I tried printing every function of the memory class but it can be seen that no
save
call is being made. Only search is done and it empty results and nothing is being added.Operating System
macOS Sonoma
Python Version
3.10
crewAI Version
0.51.1
crewAI Tools Version
0.8.3
Virtual Environment
Venv
Evidence
Possible Solution
Save function needs to be called properly.
Additional context
Nothing much
The text was updated successfully, but these errors were encountered: