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() |