Davidliu 3 months ago
parent
commit
3bfe0ef07f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/voip/bot.py

+ 2 - 2
src/core/voip/bot.py

@@ -441,7 +441,7 @@ class ToTextBotAgent:
     def to_request(self, request: BotChatRequest, try_count = 3):
         start_time = time.time()
         request_data = request.to_json_string()
-        response = None
+        response_data = None
         try:
             message = None
             url = f"http://{SERVE_HOST}:40072/botservice"
@@ -477,7 +477,7 @@ class ToTextBotAgent:
             latency = (time.time() - start_time)
             registry.BOT_REQUEST_COUNT.inc()
             registry.BOT_REQUEST_LATENCY.labels(request.taskId).observe(latency)
-            self.call_agent.logger.info(f"sessionId={ self.call_agent.session_id}, timeCost={latency}, chat::request:{request_data}, response:{response.text if response else None}")
+            self.call_agent.logger.info(f"sessionId={ self.call_agent.session_id}, timeCost={latency}, chat::request:{request_data}, response:{response_data if response_data else None}")
 
 
     def to_quest(self, request: BotChatRequest, try_count = 3):