Update xunfei_spark_bot.py

讯飞接口升级到v3.5版本,同时升级到wss协议,避免请求时出现11200错误码的问题
This commit is contained in:
Zhuoheng Lee
2024-02-21 14:14:19 +08:00
committed by GitHub
parent 74ebbdd761
commit 64ae3d1e21

View File

@@ -47,7 +47,8 @@ class XunFeiBot(Bot):
# 默认使用v2.0版本: "ws://spark-api.xf-yun.com/v2.1/chat"
# v1.5版本为: "ws://spark-api.xf-yun.com/v1.1/chat"
# v3.0版本为: "ws://spark-api.xf-yun.com/v3.1/chat"
self.spark_url = "ws://spark-api.xf-yun.com/v3.1/chat"
# 升级到v3.5版本同时升级到wss协议避免请求时出现11200错误码
self.spark_url = "wss://spark-api.xf-yun.com/v3.5/chat"
self.host = urlparse(self.spark_url).netloc
self.path = urlparse(self.spark_url).path
# 和wenxin使用相同的session机制