Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,11 +40,11 @@ def get_restaurants(search, location, meters):
|
|
| 40 |
"filter": {"searchTrip": newTrip}
|
| 41 |
}
|
| 42 |
}
|
| 43 |
-
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
model="gpt-4o",
|
| 49 |
messages=[
|
| 50 |
{"role": "system", "content": "You are a helpful restaurant assistant. Answer shortly and quickly. You will get a context if the context is not relevant to the user query please address that and not provide by default the restaurants as is."},
|
|
|
|
| 40 |
"filter": {"searchTrip": newTrip}
|
| 41 |
}
|
| 42 |
}
|
| 43 |
+
st.write("Vector query")
|
| 44 |
+
restaurant_docs = list(trips_collection.aggregate([vectorQuery, {"$project": {"_id": 0, "embedding": 0}}]))
|
| 45 |
|
| 46 |
+
st.write("RAG...")
|
| 47 |
+
stream_response = openai_client.chat.completions.create(
|
| 48 |
model="gpt-4o",
|
| 49 |
messages=[
|
| 50 |
{"role": "system", "content": "You are a helpful restaurant assistant. Answer shortly and quickly. You will get a context if the context is not relevant to the user query please address that and not provide by default the restaurants as is."},
|