chroma / server.py
anubhav77's picture
Add list_collection and db path
5f34b1a
raw
history blame
448 Bytes
from chromadb.config import Settings
import chromadb
import time
class client():
def __init__(self):
self.db = chromadb.Client(Settings(
chroma_db_impl="duckdb+parquet",
persist_directory="./index/chroma" # Optional, defaults to .chromadb/ in the current directory
))
def heartbeat(self):
return int(time.time_ns())
def list_collections(self):
return self.db.list_collections()