How-to clear or set-up separate Knowledge sources? #1980
Replies: 1 comment
-
Solved it myself. Just did: subprocess.run(["crewai", "reset-memories", "--knowledge"], check=True) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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