geethareddy commited on
Commit
e84b7b8
·
verified ·
1 Parent(s): 78a386a

Update static/script.js

Browse files
Files changed (1) hide show
  1. static/script.js +2 -2
static/script.js CHANGED
@@ -157,7 +157,7 @@ function getFoodSuggestions() {
157
  .then(response => response.json())
158
  .then(data => {
159
  if (data.error) {
160
- addMessage('bot', `Sorry, there was an error getting recipe ideas: ${data.error}`);
161
  } else {
162
  addMessage('bot', 'Here are some recipe ideas based on your selected ingredients:');
163
  data.suggestions.forEach(suggestion => addMessage('bot', suggestion));
@@ -169,7 +169,7 @@ function getFoodSuggestions() {
169
  }
170
  })
171
  .catch(error => {
172
- addMessage('bot', `Error: Unable to get recipe ideas. ${error.message}`);
173
  });
174
  }
175
 
 
157
  .then(response => response.json())
158
  .then(data => {
159
  if (data.error) {
160
+ addMessage('bot', `Sorry, there was an error getting recipe ideas: ${data.error}. Please check your OpenAI quota or contact support.`);
161
  } else {
162
  addMessage('bot', 'Here are some recipe ideas based on your selected ingredients:');
163
  data.suggestions.forEach(suggestion => addMessage('bot', suggestion));
 
169
  }
170
  })
171
  .catch(error => {
172
+ addMessage('bot', `Error: Unable to get recipe ideas. ${error.message}. Please check your OpenAI quota or contact support.`);
173
  });
174
  }
175