bstraehle commited on
Commit
0835210
·
verified ·
1 Parent(s): c4136a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -36,27 +36,27 @@ def invoke(openai_api_key, prompt, rag_option):
36
 
37
  if (RAG_INGESTION):
38
  rag_ingestion(collection)
39
-
40
- """
41
- print("777")
42
- search_path = "address.country"
43
-
44
- print("888")
45
- # Create a match stage
46
- match_stage = {
47
- "$match": {
48
- search_path: re.compile(r"United States"),
49
- "accommodates": { "$gt": 1, "$lt": 3}
 
 
50
  }
51
- }
52
-
53
- print("999")
54
- additional_stages = [match_stage]
55
- """
56
-
57
- print("000")
58
- #result = handle_user_query(openai_api_key, query, db, collection, additional_stages)
59
- return handle_user_prompt(openai_api_key, prompt, db, collection)
60
 
61
  gr.close_all()
62
 
 
36
 
37
  if (RAG_INGESTION):
38
  rag_ingestion(collection)
39
+ return
40
+ else:
41
+ """
42
+ print("777")
43
+ search_path = "address.country"
44
+
45
+ print("888")
46
+ # Create a match stage
47
+ match_stage = {
48
+ "$match": {
49
+ search_path: re.compile(r"United States"),
50
+ "accommodates": { "$gt": 1, "$lt": 3}
51
+ }
52
  }
53
+
54
+ print("999")
55
+ additional_stages = [match_stage]
56
+ """
57
+
58
+ #result = handle_user_query(openai_api_key, query, db, collection, additional_stages)
59
+ return rag_retrieval(openai_api_key, prompt, db, collection)
 
 
60
 
61
  gr.close_all()
62