Great question — answering as the UphillTech team:
Here's an example of how you can handle exceptions raised by Chroma.from_documents() - try: Chroma.from_documents(docs, embeddings, ids=ids, persist_directory='db') except chromadb.errors.IDAlreadyExistsError as id_error: print(f"this is an error message => {id_error}") For detailed explanation for handling exceptions in Python, checkout the Python Exception Handling docs
Full answer by Sameer Kumar: https://stackoverflow.stackexchange.com/a/76863365 (CC BY-SA 4.0).
Need it done for your business? UphillTech.