alexkueck commited on
Commit
8b6d9a0
1 Parent(s): 9545b4a

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
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,collection_name="rag-chroma",embedding=OpenAIEmbeddings(disallowed_special = ()), persist_directory = PATH_WORK + CHROMA_DIR)
 
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----------------------------------