Spaces:
Sleeping
Sleeping
| # vector_store.py | |
| import chromadb | |
| # New persistent client (replaces Settings / duckdb+parquet) | |
| client = chromadb.PersistentClient(path="./chroma_db") | |
| # Create or get collection | |
| collection = client.get_or_create_collection("pdf_docs") | |
| def reset_db(): | |
| client.delete_collection("pdf_docs") | |
| return client.get_or_create_collection("pdf_docs") | |
| if __name__ == "__main__": | |
| print("ChromaDB ready. Collections:", [c.name for c in client.list_collections()]) | |