Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,13 +29,15 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
29 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
30 |
|
31 |
###
|
32 |
-
|
33 |
I want to stay in a place that's warm and friendly,
|
34 |
and not too far from resturants, can you recommend a place?
|
35 |
Include a reason as to why you've chosen your selection.
|
36 |
"""
|
37 |
-
|
38 |
###
|
|
|
|
|
39 |
|
40 |
"""
|
41 |
if (RAG_INGESTION):
|
@@ -65,7 +67,7 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
65 |
del os.environ["OPENAI_API_KEY"]
|
66 |
"""
|
67 |
|
68 |
-
return
|
69 |
|
70 |
gr.close_all()
|
71 |
|
|
|
29 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
30 |
|
31 |
###
|
32 |
+
prompt = """
|
33 |
I want to stay in a place that's warm and friendly,
|
34 |
and not too far from resturants, can you recommend a place?
|
35 |
Include a reason as to why you've chosen your selection.
|
36 |
"""
|
37 |
+
result = handle_user_prompt(prompt, db, collection)
|
38 |
###
|
39 |
+
|
40 |
+
del os.environ["OPENAI_API_KEY"]
|
41 |
|
42 |
"""
|
43 |
if (RAG_INGESTION):
|
|
|
67 |
del os.environ["OPENAI_API_KEY"]
|
68 |
"""
|
69 |
|
70 |
+
return result
|
71 |
|
72 |
gr.close_all()
|
73 |
|