Davidliu 1 viikko sitten
vanhempi
commit
04134b2f37
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/core/voip/bot.py

+ 3 - 0
src/core/voip/bot.py

@@ -455,6 +455,7 @@ class ToTextBotAgent:
             while try_count > 0:
                 once_start = time.time()
                 try:
+                    message.strip()
                     response = requests.post(url, data=request_data, headers=headers, timeout=3)
                     if response and response.ok:
                         response_data = response.json()
@@ -475,7 +476,9 @@ class ToTextBotAgent:
                     latency = (time.time() - once_start)
                     registry.BOT_REQUEST_ONCE_LATENCY.labels(request.taskId).observe(latency)
 
+            self.call_agent.logger.info(f"sessionId:{request.sessionId}, message:{message}")
             if not message:
+                self.call_agent.logger.info(f"sessionId:{request.sessionId}, come in default response")
                 massage = self.get_default_response()
                 self.call_agent.message_queue.put(massage)
         finally: