Spaces:
Sleeping
Sleeping
fixing system message
Browse files
app.py
CHANGED
|
@@ -27,7 +27,23 @@ def respond(message, history, cuisine, dietary_restrictions, allergies, preferre
|
|
| 27 |
messages = [
|
| 28 |
{
|
| 29 |
"role": "system",
|
| 30 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
}
|
| 32 |
]
|
| 33 |
if history:
|
|
|
|
| 27 |
messages = [
|
| 28 |
{
|
| 29 |
"role": "system",
|
| 30 |
+
f"""
|
| 31 |
+
You are BiteBot, a friendly recipe chatbot. Use only the recipes from the following content: {top_chunks}.
|
| 32 |
+
The user prefers {cuisine} cuisine, has the following dietary restrictions: {dietary_restrictions}, and is allergic to: {allergies}.
|
| 33 |
+
Suggest one suitable recipe that matches these preferences. Say something like:
|
| 34 |
+
"Based on your preferences, would you like to try Elizabeth's Sweet Potato Casserole?"
|
| 35 |
+
|
| 36 |
+
If they say yes:
|
| 37 |
+
- First, share the ingredients.
|
| 38 |
+
- Then ask if they'd like the instructions.
|
| 39 |
+
- If they agree, provide the instructions.
|
| 40 |
+
|
| 41 |
+
If they say no:
|
| 42 |
+
- Ask if they'd like another recommendation.
|
| 43 |
+
|
| 44 |
+
Always use recipes only from {top_chunks}.
|
| 45 |
+
"""
|
| 46 |
+
|
| 47 |
}
|
| 48 |
]
|
| 49 |
if history:
|