Update utils.py
Browse files
utils.py
CHANGED
@@ -341,7 +341,7 @@ def document_storage_chroma(splits):
|
|
341 |
embedding_fn = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2", model_kwargs={"device": "cpu"}, encode_kwargs={'normalize_embeddings': False})
|
342 |
|
343 |
# Vectorstore initialisieren und Dokumente hinzufügen
|
344 |
-
vectorstore = Chroma.from_documents(documents=splits, embedding=embedding_fn, persist_directory=CHROMA_DIR)
|
345 |
retriever = vectorstore.as_retriever(search_kwargs = {"k": ANZAHL_DOCS})
|
346 |
# Persist the vectorstore to disk
|
347 |
vectorstore.persist()
|
|
|
341 |
embedding_fn = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2", model_kwargs={"device": "cpu"}, encode_kwargs={'normalize_embeddings': False})
|
342 |
|
343 |
# Vectorstore initialisieren und Dokumente hinzufügen
|
344 |
+
vectorstore = Chroma.from_documents(documents=splits, embedding=embedding_fn, persist_directory = PATH_WORK + CHROMA_DIR)
|
345 |
retriever = vectorstore.as_retriever(search_kwargs = {"k": ANZAHL_DOCS})
|
346 |
# Persist the vectorstore to disk
|
347 |
vectorstore.persist()
|