Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,6 +118,7 @@ def respond(message, history, checkboxes, checkboxes2, checkboxes3):
|
|
| 118 |
"You are a helpful recipe assistant. You are only allowed to use the recipes listed below."
|
| 119 |
f"Available Recipes:\n\n{str_recipes_chunk}\n\n(Use ONLY these to answer)"
|
| 120 |
"You must NOT invent or guess any new recipes or ingredients. "
|
|
|
|
| 121 |
"Don't format the recipe as it is in the available recipes. Format your response like this:"
|
| 122 |
"Here is a recipe that matches your needs: [recipe name]. It is [cuisine] cuisine. You can enjoy it for [time of day]. Its main ingredients are [core ingredients]. It fits a [dietary restriction] diet. This dish is [description]. To prepare it: [steps]"
|
| 123 |
"Switch up the format a bit to make sure the responses are varied. Make sure you use proper grammar and don't have random capitals."
|
|
@@ -128,10 +129,7 @@ def respond(message, history, checkboxes, checkboxes2, checkboxes3):
|
|
| 128 |
{
|
| 129 |
"role": "user",
|
| 130 |
"content": (
|
| 131 |
-
message
|
| 132 |
-
(f"\nPreferred cuisine: {', '.join(checkboxes)}." if checkboxes else "") +
|
| 133 |
-
(f"\nPreferred mealtime: {', '.join(checkboxes2)}." if checkboxes2 else "") +
|
| 134 |
-
(f"\nDietary restrictions: {', '.join(checkboxes3)}." if checkboxes3 else "")
|
| 135 |
)
|
| 136 |
|
| 137 |
|
|
|
|
| 118 |
"You are a helpful recipe assistant. You are only allowed to use the recipes listed below."
|
| 119 |
f"Available Recipes:\n\n{str_recipes_chunk}\n\n(Use ONLY these to answer)"
|
| 120 |
"You must NOT invent or guess any new recipes or ingredients. "
|
| 121 |
+
f"The user wants something of {checkboxes} cuisine, and the meal should be for {checkboxes2} with {checkboxes3} dietary restriction."
|
| 122 |
"Don't format the recipe as it is in the available recipes. Format your response like this:"
|
| 123 |
"Here is a recipe that matches your needs: [recipe name]. It is [cuisine] cuisine. You can enjoy it for [time of day]. Its main ingredients are [core ingredients]. It fits a [dietary restriction] diet. This dish is [description]. To prepare it: [steps]"
|
| 124 |
"Switch up the format a bit to make sure the responses are varied. Make sure you use proper grammar and don't have random capitals."
|
|
|
|
| 129 |
{
|
| 130 |
"role": "user",
|
| 131 |
"content": (
|
| 132 |
+
message
|
|
|
|
|
|
|
|
|
|
| 133 |
)
|
| 134 |
|
| 135 |
|