Update utils.py
Browse files
utils.py
CHANGED
@@ -269,7 +269,8 @@ def document_loading_splitting():
|
|
269 |
#Chroma DB die splits ablegen - vektorisiert...
|
270 |
def document_storage_chroma(splits):
|
271 |
# Add to vectorDB
|
272 |
-
vectorstore = Chroma.from_documents(documents=splits,
|
|
|
273 |
retriever = vectorstore.as_retriever(search_kwargs = {"k": 4})
|
274 |
|
275 |
#OpenAi embeddings----------------------------------
|
|
|
269 |
#Chroma DB die splits ablegen - vektorisiert...
|
270 |
def document_storage_chroma(splits):
|
271 |
# Add to vectorDB
|
272 |
+
vectorstore = Chroma.from_documents(documents = splits, embedding = OpenAIEmbeddings(disallowed_special = ()), persist_directory = PATH_WORK + CHROMA_DIR)
|
273 |
+
#Chroma.from_documents(documents=splits,collection_name="rag-chroma",embedding=OpenAIEmbeddings(disallowed_special = ()), persist_directory = PATH_WORK + CHROMA_DIR)
|
274 |
retriever = vectorstore.as_retriever(search_kwargs = {"k": 4})
|
275 |
|
276 |
#OpenAi embeddings----------------------------------
|