Spaces:
Sleeping
Sleeping
File size: 464 Bytes
e7e9247 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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()])
|