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

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

@@ -446,7 +446,6 @@ class ToTextBotAgent:
             message = None
             url = f"http://{SERVE_HOST}:40072/botservice"
             headers = {"Content-Type": "application/json"}
-            # payload = json.loads(request_data)
             while try_count > 0:
                 once_start = time.time()
                 try:
@@ -486,7 +485,7 @@ class ToTextBotAgent:
         response = None
         try:
             url = f"http://{SERVE_HOST}:40072/botservice"
-            payload = json.loads(request_data)
+            # payload = request.to_json_string()
             # self.call_agent.logger.info(f"请求数据:{request_data},url:{url}")
             with requests.Session() as session:
                 message = None
@@ -495,7 +494,7 @@ class ToTextBotAgent:
                 while try_count > 0:
                     once_start = time.time()
                     try:
-                        response = session.post(url=url, json=payload, timeout=3)
+                        response = session.post(url=url, json=request_data, timeout=3)
                         # response = requests.post(url=url,  json=json.loads(request_data), headers=headers, timeout=10)  # 使用占位URL
                         self.call_agent.logger.info("to_request come in , try_count=%s", try_count)
                         if response.status_code == 200: