Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +3 -2
static/script.js
CHANGED
|
@@ -43,9 +43,10 @@ function handleResponse(userInput) {
|
|
| 43 |
botResponse = `Nice to meet you, ${userInput}! 😊 Let's create your perfect meal! What type of food would you prefer?`;
|
| 44 |
options = [
|
| 45 |
{ text: 'Vegetarian', class: 'green' },
|
| 46 |
-
{ text: 'Non-Vegetarian', class: 'red' }
|
|
|
|
| 47 |
];
|
| 48 |
-
} else if (lastMessage.includes('vegetarian') || lastMessage.includes('non-vegetarian')) {
|
| 49 |
botResponse = `Great choice! 🍽️ These are the available ingredients for ${lastMessage}:`;
|
| 50 |
fetchIngredients(lastMessage.toLowerCase()); // Pass the preference directly
|
| 51 |
return; // Exit early to handle ingredients fetch
|
|
|
|
| 43 |
botResponse = `Nice to meet you, ${userInput}! 😊 Let's create your perfect meal! What type of food would you prefer?`;
|
| 44 |
options = [
|
| 45 |
{ text: 'Vegetarian', class: 'green' },
|
| 46 |
+
{ text: 'Non-Vegetarian', class: 'red' },
|
| 47 |
+
{ text: 'Both', class: 'gray' } // Added "Both" option
|
| 48 |
];
|
| 49 |
+
} else if (lastMessage.includes('vegetarian') || lastMessage.includes('non-vegetarian') || lastMessage.includes('both')) {
|
| 50 |
botResponse = `Great choice! 🍽️ These are the available ingredients for ${lastMessage}:`;
|
| 51 |
fetchIngredients(lastMessage.toLowerCase()); // Pass the preference directly
|
| 52 |
return; // Exit early to handle ingredients fetch
|