From 74119d037286b92c45267d6f154b3d8bba31e417 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Fri, 25 Aug 2023 23:57:59 +0800 Subject: [PATCH] fix: websocket version --- bot/xunfei/xunfei_spark_bot.py | 3 ++- requirements-optional.txt | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/xunfei/xunfei_spark_bot.py b/bot/xunfei/xunfei_spark_bot.py index ddda15e..b5113d4 100644 --- a/bot/xunfei/xunfei_spark_bot.py +++ b/bot/xunfei/xunfei_spark_bot.py @@ -178,11 +178,12 @@ class ReplyItem: # 收到websocket错误的处理 def on_error(ws, error): + logger.error("[XunFei] error:", error) # 收到websocket关闭的处理 -def on_close(ws, one, two): +def on_close(ws): data_queue = queue_map.get(ws.session_id) data_queue.put("END") diff --git a/requirements-optional.txt b/requirements-optional.txt index 48ecd88..b91d3ff 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -27,5 +27,4 @@ wechatpy chatgpt_tool_hub==0.4.6 # xunfei spark -websocket==0.2.1 -websocket-client==1.6.2 +websocket-client==1.2.0