chroma
chroma copied to clipboard
Simplify Client init for Local or Rest
Currently users need to remember specific syntax to use chroma in local mode with persistence or API mode.
# init persistance
from chromadb.config import Settings
client = chromadb.Client(Settings(
chroma_db_impl="duckdb+parquet",
persist_directory="/path/to/persist/directory"
))
# init rest client
import chromadb
from chromadb.config import Settings
chroma_client = chromadb.Client(Settings(chroma_api_impl="rest",
chroma_server_host="localhost",
chroma_server_http_port="8000"
))
What do we think about simplifying the API (in a backwards compatible way)? Something like this
# init persistance
client = chromadb.LocalClient(persist_directory="/path/to/persist/directory")
# init rest client
chroma_client = chromadb.RestClient(url="localhost:8000")
The javascript client doesn't have this "problem" because we currently do not support in-memory for JS, but it may be a good idea to mirror the APIs none-the-less for future-proofing.
I think #214 is supposed to introduce a simplified settings? cc @levand
awesome! apologies if i missed this.
closed in favor of https://github.com/chroma-core/chroma/issues/714