The chat with doc implementation uses LangChain's Chroma.from_documents() method. This creates a separate Chroma client each time it's called (unless LangChain manages that deep down in the bits). Chroma warns against this, "Having many clients that are loading and saving to the same path can cause strange behavior including data deletion. As a general practice, create a Chroma client once in your application, and pass it around instead of creating many clients." Modify this so one client is managed and passed around
As it stands, data will just keep getting added to Chroma until it bursts. Add some logic to remove old stuff