-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] Cannot create 'Knowledge': Failed to create or get collection #2055
Comments
I guess this has been fixed, can you try updating the crew version. |
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Hi @AlemaoEc, did this worked for you? |
Hi! It didn't work. I migrated the solution to another library. |
Same issue here. When I put the knowledge_sources inside the agent, it gives me the same error, but when I put the knowledge_sources inside the crew, I get no error. |
Hi @GabrielBoninUnity, Also possible please share your code, will try to recreate the bug, thanks. |
Hey @Vidit-Ostwal , looks like i got it fix like this here `import os Load environment variablesload_dotenv() @crewbase
` |
Hi @GabrielBoninUnity, can you explain what exactly you changed. |
I added the llm code like this llm = LLM( and also tagged the agent with it like this |
Description
I am following the documentation here: https://docs.crewai.com/concepts/knowledge#what-is-knowledge
Steps to Reproduce
When I create a Crew or Agent that has a parameter for knowledge_sources and then run the agent I get the error.
Expected behavior
That the knowledge_source was created and could be accessed by the agent or Crew.
Screenshots/Code snippets
See above.
Operating System
macOS Monterey
Python Version
3.11
crewAI Version
0.100.1
crewAI Tools Version
None
Virtual Environment
Venv
Evidence
File "/crewai_support_agent/.venv/lib/python3.12/site-packages/pydantic/main.py", line 214, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/crewai_support_agent/.venv/lib/python3.12/site-packages/crewai/agent.py", line 140, in post_init_setup
self._set_knowledge()
File "/crewai_support_agent/.venv/lib/python3.12/site-packages/crewai/agent.py", line 246, in _set_knowledge
self._knowledge = Knowledge(
^^^^^^^^^^
File "crewai_support_agent/.venv/lib/python3.12/site-packages/crewai/knowledge/knowledge.py", line 43, in init
self.storage.initialize_knowledge_storage()
File "/crewai_support_agent/.venv/lib/python3.12/site-packages/crewai/knowledge/storage/knowledge_storage.py", line 107, in initialize_knowledge_storage
raise Exception("Failed to create or get collection")
Exception: Failed to create or get collection
Possible Solution
I don't know.
Additional context
Same error: #1859 (comment)
The text was updated successfully, but these errors were encountered: