Update utils.py
Browse files
utils.py
CHANGED
@@ -271,7 +271,7 @@ 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":
|
275 |
|
276 |
#OpenAi embeddings----------------------------------
|
277 |
#Chroma.from_documents(documents = splits, embedding = OpenAIEmbeddings(disallowed_special = ()), persist_directory = PATH_WORK + CHROMA_DIR)
|
|
|
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": 5})
|
275 |
|
276 |
#OpenAi embeddings----------------------------------
|
277 |
#Chroma.from_documents(documents = splits, embedding = OpenAIEmbeddings(disallowed_special = ()), persist_directory = PATH_WORK + CHROMA_DIR)
|