Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +5 -2
static/script.js
CHANGED
@@ -53,11 +53,14 @@ function handleResponse(userInput) {
|
|
53 |
botResponse = 'Great choice! 🍽️ Here are some vegetarian ingredients:';
|
54 |
fetchIngredients('vegetable');
|
55 |
return;
|
56 |
-
} else if (lastMessage.includes('
|
57 |
conversation.push({ role: 'user', message: 'Non-Vegetarian' });
|
58 |
console.log("Food preference selected: Non-Vegetarian");
|
59 |
botResponse = 'Great choice! 🍽️ Here are some non-vegetarian ingredients:';
|
60 |
-
fetchIngredients('
|
|
|
|
|
|
|
61 |
return;
|
62 |
} else if (lastMessage.includes('yes') && selectedMenuItem) {
|
63 |
botResponse = 'Here are some ingredients to customize your dish:';
|
|
|
53 |
botResponse = 'Great choice! 🍽️ Here are some vegetarian ingredients:';
|
54 |
fetchIngredients('vegetable');
|
55 |
return;
|
56 |
+
} else if (lastMessage.includes('non-vegetarian')) {
|
57 |
conversation.push({ role: 'user', message: 'Non-Vegetarian' });
|
58 |
console.log("Food preference selected: Non-Vegetarian");
|
59 |
botResponse = 'Great choice! 🍽️ Here are some non-vegetarian ingredients:';
|
60 |
+
fetchIngredients('non-vegetarian');
|
61 |
+
return;
|
62 |
+
} else if (selectedIngredients.length > 0) {
|
63 |
+
fetchMenuItemsByIngredients();
|
64 |
return;
|
65 |
} else if (lastMessage.includes('yes') && selectedMenuItem) {
|
66 |
botResponse = 'Here are some ingredients to customize your dish:';
|