Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,18 +28,18 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
28 |
if (RAG_INGESTION):
|
29 |
return rag_ingestion(collection)
|
30 |
else:
|
31 |
-
|
32 |
match_stage = {
|
33 |
"$match": {
|
34 |
-
"address.
|
35 |
"accommodates": { "$gt": 1, "$lt": 3}
|
36 |
}
|
37 |
}
|
38 |
|
39 |
additional_stages = [match_stage]
|
40 |
-
|
41 |
-
|
42 |
-
search_results = rag_retrieval(openai_api_key, prompt, db, collection)
|
43 |
return rag_inference(openai_api_key, prompt, search_results)
|
44 |
|
45 |
gr.close_all()
|
|
|
28 |
if (RAG_INGESTION):
|
29 |
return rag_ingestion(collection)
|
30 |
else:
|
31 |
+
###
|
32 |
match_stage = {
|
33 |
"$match": {
|
34 |
+
"address.market": re.compile(r"San Francisco"),
|
35 |
"accommodates": { "$gt": 1, "$lt": 3}
|
36 |
}
|
37 |
}
|
38 |
|
39 |
additional_stages = [match_stage]
|
40 |
+
###
|
41 |
+
|
42 |
+
search_results = rag_retrieval(openai_api_key, prompt, db, collection, additional_stages)
|
43 |
return rag_inference(openai_api_key, prompt, search_results)
|
44 |
|
45 |
gr.close_all()
|