Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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,
|
| 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 |
-
#
|
| 249 |
-
|
| 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:]
|