How-to clear or set-up separate Knowledge sources? #1980
Replies: 5 comments 1 reply
-
Solved it myself. Just did: subprocess.run(["crewai", "reset-memories", "--knowledge"], check=True) |
Beta Was this translation helpful? Give feedback.
-
Hi @GunnarStrandber Have you found any other solution? Do we not have to restart the crew every time? Also I have implemented Docling knowledge source but can't see where crewai is saving the vector db. |
Beta Was this translation helpful? Give feedback.
-
The collection name is defined based on Agent.rule. If you added many knowledge sources to the agent, all those source will be stored in the same collection. |
Beta Was this translation helpful? Give feedback.
-
Okay, can you share some references? I am not clear. Basically, what I want is for different agents to use different knowledge sources. My main concern is where Crewai saves the embeddings generated. I can't find any Directory made for it. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I am doing a project where it is important that data between runs is not stored in the same ChromaDB as data gets mixed up.
It worked well to solve it using:
crewai reset-memories --knowledge
But I want to be able to clear (or create new, separate collections) within the code, as I have built an Streamlit app that re-runs the flow with new data given what is selected.
Tried this:
doc_id = os.path.basename(os.path.dirname(cust_path)) # e.g. "DOC-003"
collection_name = f"collection_{doc_id}"
self.customer_profile = JSONKnowledgeSource(
file_paths=[cust_path],
# instruct or override the default collection name here, if Crew.ai allows:
collection_name=collection_name
)
But it did not work, guess that crew.ai does not expose the collection_name?
Any tips?
Best regards,
Gunnar
Beta Was this translation helpful? Give feedback.
All reactions