Bhanumani12 commited on
Commit
d3cdd12
·
verified ·
1 Parent(s): 60d0010

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -185,7 +185,7 @@ def validate_metadata(metadata, admin_id=None):
185
 
186
  return mtype, issue, recommendation
187
 
188
- # ---------- Salesforce Chatbot (messages format, 2+ line answers) ----------
189
  conversation_history = [] # optional global memory
190
 
191
  def salesforce_chatbot(query: str, chat_messages: list):
@@ -245,10 +245,8 @@ Assistant:
245
  if output.startswith("Assistant:"):
246
  output = output.replace("Assistant:", "").strip()
247
 
248
- # Enforce 2+ meaningful lines
249
- if len(output.split()) < 20:
250
- output = (output + "\n\n"
251
- "Tip: You can verify limits and examples in the official docs at https://developer.salesforce.com/docs.")
252
 
253
  conversation_history.append((query, output))
254
  conversation_history[:] = conversation_history[-6:]
 
185
 
186
  return mtype, issue, recommendation
187
 
188
+ # ---------- Salesforce Chatbot (messages format, no tip line) ----------
189
  conversation_history = [] # optional global memory
190
 
191
  def salesforce_chatbot(query: str, chat_messages: list):
 
245
  if output.startswith("Assistant:"):
246
  output = output.replace("Assistant:", "").strip()
247
 
248
+ # NOTE: No extra "Tip:" or any appended lines here.
249
+ # We rely purely on the model output (prompt encourages 2+ lines).
 
 
250
 
251
  conversation_history.append((query, output))
252
  conversation_history[:] = conversation_history[-6:]