bstraehle commited on
Commit
8f1e55a
·
1 Parent(s): e0ddc02

Update rag_langchain.py

Browse files
Files changed (1) hide show
  1. rag_langchain.py +2 -3
rag_langchain.py CHANGED
@@ -16,7 +16,6 @@ from langchain.vectorstores import MongoDBAtlasVectorSearch
16
  from pymongo import MongoClient
17
 
18
  RAG_CHROMA = "Chroma"
19
- RAG_MONGODB = "MongoDB"
20
 
21
  PDF_URL = "https://arxiv.org/pdf/2303.08774.pdf"
22
  WEB_URL = "https://openai.com/research/gpt-4"
@@ -91,7 +90,7 @@ def rag_ingestion(config):
91
 
92
  chunks = split_documents(config, docs)
93
 
94
- store_chroma(chunks)
95
  store_mongodb(chunks)
96
 
97
  def retrieve_chroma():
@@ -126,7 +125,7 @@ def rag_chain(config, rag_option, prompt):
126
 
127
  if (rag_option == RAG_CHROMA):
128
  db = retrieve_chroma()
129
- elif (rag_option == RAG_MONGODB):
130
  db = retrieve_mongodb()
131
 
132
  rag_chain = RetrievalQA.from_chain_type(
 
16
  from pymongo import MongoClient
17
 
18
  RAG_CHROMA = "Chroma"
 
19
 
20
  PDF_URL = "https://arxiv.org/pdf/2303.08774.pdf"
21
  WEB_URL = "https://openai.com/research/gpt-4"
 
90
 
91
  chunks = split_documents(config, docs)
92
 
93
+ #store_chroma(chunks)
94
  store_mongodb(chunks)
95
 
96
  def retrieve_chroma():
 
125
 
126
  if (rag_option == RAG_CHROMA):
127
  db = retrieve_chroma()
128
+ else:
129
  db = retrieve_mongodb()
130
 
131
  rag_chain = RetrievalQA.from_chain_type(