Nanny7 commited on
Commit
2256395
·
1 Parent(s): 94e34b9

Fix additional AI response display issues by ensuring consistent message variable usage

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -384,7 +384,7 @@ def respond(
384
  # 发送webhook通知(仅在有重要对话时)
385
  if len(response) > 50: # 只有较长的回复才发送通知
386
  send_webhook_notification("new_conversation", {
387
- "user_message": message,
388
  "ai_response": response,
389
  "model_used": model_used,
390
  "character_role": character_role
@@ -403,7 +403,7 @@ def respond(
403
  send_webhook_notification("error", {
404
  "type": "processing_error",
405
  "message": str(e),
406
- "user_message": message
407
  })
408
 
409
 
 
384
  # 发送webhook通知(仅在有重要对话时)
385
  if len(response) > 50: # 只有较长的回复才发送通知
386
  send_webhook_notification("new_conversation", {
387
+ "user_message": conversation_data["message"], # 使用conversation_data中的原始消息
388
  "ai_response": response,
389
  "model_used": model_used,
390
  "character_role": character_role
 
403
  send_webhook_notification("error", {
404
  "type": "processing_error",
405
  "message": str(e),
406
+ "user_message": conversation_data["message"] # 使用conversation_data中的原始消息
407
  })
408
 
409