Browse Source

fix: websocket version

master
zhayujie 1 year ago
parent
commit
74119d0372
2 changed files with 3 additions and 3 deletions
  1. +2
    -1
      bot/xunfei/xunfei_spark_bot.py
  2. +1
    -2
      requirements-optional.txt

+ 2
- 1
bot/xunfei/xunfei_spark_bot.py View File

@@ -178,11 +178,12 @@ class ReplyItem:


# 收到websocket错误的处理 # 收到websocket错误的处理
def on_error(ws, error): def on_error(ws, error):

logger.error("[XunFei] error:", error) logger.error("[XunFei] error:", error)




# 收到websocket关闭的处理 # 收到websocket关闭的处理
def on_close(ws, one, two):
def on_close(ws):
data_queue = queue_map.get(ws.session_id) data_queue = queue_map.get(ws.session_id)
data_queue.put("END") data_queue.put("END")




+ 1
- 2
requirements-optional.txt View File

@@ -27,5 +27,4 @@ wechatpy
chatgpt_tool_hub==0.4.6 chatgpt_tool_hub==0.4.6


# xunfei spark # xunfei spark
websocket==0.2.1
websocket-client==1.6.2
websocket-client==1.2.0

Loading…
Cancel
Save