Fix: Disable Chroma Telemetry

Opts-out of anonymized telemetry being tracked in Chroma.

See: https://docs.trychroma.com/telemetry
This commit is contained in:
R-Y-M-R 2023-05-11 10:17:18 -04:00
parent 60225698b6
commit 8c6a81a07f
3 changed files with 17 additions and 4 deletions

View file

@ -3,12 +3,13 @@ from langchain.embeddings import LlamaCppEmbeddings
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.vectorstores import Chroma
from langchain.llms import GPT4All
from chroma_preference import PERSIST_DIRECTORY
from chroma_preference import CHROMA_SETTINGS
def main():
# Load stored vectorstore
llama = LlamaCppEmbeddings(model_path="./models/ggml-model-q4_0.bin")
persist_directory = 'db'
db = Chroma(persist_directory=persist_directory, embedding_function=llama)
db = Chroma(persist_directory=PERSIST_DIRECTORY, embedding_function=llama, client_settings=CHROMA_SETTINGS)
retriever = db.as_retriever()
# Prepare the LLM
callbacks = [StreamingStdOutCallbackHandler()]