bstraehle commited on
Commit
010a028
·
1 Parent(s): 3754c7e

Update rag.py

Browse files
Files changed (1) hide show
  1. rag.py +3 -3
rag.py CHANGED
@@ -62,12 +62,12 @@ def document_splitting(config, docs):
62
 
63
  def document_storage_chroma(chunks):
64
  Chroma.from_documents(documents = chunks,
65
- embedding = OpenAIEmbeddings(disallowed_special = ()),
66
  persist_directory = CHROMA_DIR)
67
 
68
  def document_storage_mongodb(chunks):
69
  MongoDBAtlasVectorSearch.from_documents(documents = chunks,
70
- embedding = OpenAIEmbeddings(disallowed_special = ()),
71
  collection = collection,
72
  index_name = MONGODB_INDEX_NAME)
73
 
@@ -86,7 +86,7 @@ def document_retrieval_chroma():
86
  def document_retrieval_mongodb():
87
  return MongoDBAtlasVectorSearch.from_connection_string(MONGODB_ATLAS_CLUSTER_URI,
88
  MONGODB_DB_NAME + "." + MONGODB_COLLECTION_NAME,
89
- OpenAIEmbeddings(disallowed_special = ()),
90
  index_name = MONGODB_INDEX_NAME)
91
 
92
  def get_llm(config, openai_api_key):
 
62
 
63
  def document_storage_chroma(chunks):
64
  Chroma.from_documents(documents = chunks,
65
+ embedding = OpenAIEmbeddings(),
66
  persist_directory = CHROMA_DIR)
67
 
68
  def document_storage_mongodb(chunks):
69
  MongoDBAtlasVectorSearch.from_documents(documents = chunks,
70
+ embedding = OpenAIEmbeddings(),
71
  collection = collection,
72
  index_name = MONGODB_INDEX_NAME)
73
 
 
86
  def document_retrieval_mongodb():
87
  return MongoDBAtlasVectorSearch.from_connection_string(MONGODB_ATLAS_CLUSTER_URI,
88
  MONGODB_DB_NAME + "." + MONGODB_COLLECTION_NAME,
89
+ OpenAIEmbeddings(),
90
  index_name = MONGODB_INDEX_NAME)
91
 
92
  def get_llm(config, openai_api_key):