Shriharsh commited on
Commit
b792582
·
verified ·
1 Parent(s): a08827d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -287,25 +287,15 @@ def respond_as_arka(message, chat_history):
287
  """
288
  response_text = ""
289
  clean_message = message.strip()
290
-
291
- # 1. Check for Order Status
292
- if clean_message in ORDER_STATUS_RESPONSES:
293
- response_data = ORDER_STATUS_RESPONSES[clean_message]
294
- subject = response_data['subject']
295
- body = response_data['body']
296
- cta = response_data.get('cta')
297
- response_text = f"**{subject}**\n\n{body}"
298
- if cta:
299
- response_text += f"\n\n**CTA: {cta}**"
300
 
301
- # 2. Check for FAQ
302
  elif clean_message in FAQ_ANSWERS:
303
  response_data = FAQ_ANSWERS[clean_message]
304
  subject = response_data['subject']
305
  body = response_data['body']
306
  response_text = f"**{subject}**\n\n{body}"
307
 
308
- # 3. Query Gemini API for general conversation
309
  else:
310
  system_instruction = f"""
311
  You are ARKA, the crown prince of Jhinorya and the voice of the S-B-E-K brand.
 
287
  """
288
  response_text = ""
289
  clean_message = message.strip()
 
 
 
 
 
 
 
 
 
 
290
 
291
+ # 1. Check for FAQ
292
  elif clean_message in FAQ_ANSWERS:
293
  response_data = FAQ_ANSWERS[clean_message]
294
  subject = response_data['subject']
295
  body = response_data['body']
296
  response_text = f"**{subject}**\n\n{body}"
297
 
298
+ # 2. Query Gemini API for general conversation
299
  else:
300
  system_instruction = f"""
301
  You are ARKA, the crown prince of Jhinorya and the voice of the S-B-E-K brand.