From 8c327f192c4401b919f2dc04bd5a855a85a44e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=BB=91=E9=A9=AC?= Date: Thu, 20 Mar 2025 15:26:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AE=B0=E7=82=B9=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 718398c3d..4e2cbd033 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -266,7 +266,7 @@ class ConnectionHandler: current_text = full_text[processed_chars:] # 从未处理的位置开始 # 查找最后一个有效标点 - punctuations = ("。", "?", "!", ";", ":") + punctuations = ("。", "?", "!", ";", ":",",",",","~") last_punct_pos = -1 for punct in punctuations: pos = current_text.rfind(punct) @@ -382,7 +382,7 @@ class ConnectionHandler: current_text = full_text[processed_chars:] # 从未处理的位置开始 # 查找最后一个有效标点 - punctuations = ("。", "?", "!", ";", ":") + punctuations = ("。", "?", "!", ";", ":",",",",","~") last_punct_pos = -1 for punct in punctuations: pos = current_text.rfind(punct) @@ -589,4 +589,4 @@ class ConnectionHandler: # After chat is complete, close the connection self.close_after_chat = True except Exception as e: - self.logger.bind(tag=TAG).error(f"Chat and close error: {str(e)}") + self.logger.bind(tag=TAG).error(f"Chat and close error: {str(e)}") \ No newline at end of file