bstraehle commited on
Commit
ec65ef4
·
1 Parent(s): 227c044

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -30,6 +30,7 @@ MONGODB_INDEX_NAME = "default"
30
 
31
  config = {
32
  "model": "gpt-4",
 
33
  "temperature": 0,
34
  }
35
 
@@ -131,11 +132,13 @@ def invoke(openai_api_key, rag_option, prompt):
131
  if (rag_option == "Chroma"):
132
  #splits = document_loading_splitting()
133
  #document_storage_chroma(splits)
 
134
  db = document_retrieval_chroma(llm, prompt)
135
  result = rag_chain(llm, prompt, db)
136
  elif (rag_option == "MongoDB"):
137
  #splits = document_loading_splitting()
138
  #document_storage_mongodb(splits)
 
139
  db = document_retrieval_mongodb(llm, prompt)
140
  result = rag_chain(llm, prompt, db)
141
  else:
 
30
 
31
  config = {
32
  "model": "gpt-4",
33
+ "rag_option": "Off"
34
  "temperature": 0,
35
  }
36
 
 
132
  if (rag_option == "Chroma"):
133
  #splits = document_loading_splitting()
134
  #document_storage_chroma(splits)
135
+ config.rag_option = "Chroma"
136
  db = document_retrieval_chroma(llm, prompt)
137
  result = rag_chain(llm, prompt, db)
138
  elif (rag_option == "MongoDB"):
139
  #splits = document_loading_splitting()
140
  #document_storage_mongodb(splits)
141
+ config.rag_option = "MongoDB"
142
  db = document_retrieval_mongodb(llm, prompt)
143
  result = rag_chain(llm, prompt, db)
144
  else: