Disable chromaDB anonymous information collection (#1144)

See https://docs.trychroma.com/telemetry
This commit is contained in:
Pierre Marais 2023-11-02 12:45:48 +01:00 committed by GitHub
parent a517a588c4
commit f29df84301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import typing
import chromadb
from chromadb.config import Settings
from injector import inject, singleton
from llama_index import VectorStoreIndex
from llama_index.indices.vector_store import VectorIndexRetriever
@ -36,8 +37,10 @@ class VectorStoreComponent:
@inject
def __init__(self) -> None:
chroma_settings = Settings(anonymized_telemetry=False)
chroma_client = chromadb.PersistentClient(
path=str((local_data_path / "chroma_db").absolute())
path=str((local_data_path / "chroma_db").absolute()),
settings=chroma_settings,
)
chroma_collection = chroma_client.get_or_create_collection(
"make_this_parameterizable_per_api_call"