DurgaDeepak commited on
Commit
3039719
·
verified ·
1 Parent(s): 8f7e3ff

Update chatbot_logic.py

Browse files
Files changed (1) hide show
  1. chatbot_logic.py +5 -3
chatbot_logic.py CHANGED
@@ -38,6 +38,8 @@ def get_bot_response(query):
38
 
39
  try:
40
  result = qa_chain.invoke({"query": query})
41
- return result
42
- except Exception as e:
43
- return f"Error processing query: {str(e)}"
 
 
 
38
 
39
  try:
40
  result = qa_chain.invoke({"query": query})
41
+ if not result:
42
+ return "🤖 Sorry, I couldn't find anything relevant in the meal plans."
43
+ return result
44
+ except Exception as e:
45
+ return f"❌ Failed to process your query: {e}"