Skip to content

Commit

Permalink
Update xunfei_spark_bot.py
Browse files Browse the repository at this point in the history
update API URL for v3.0 version of Xunfei Spark.
  • Loading branch information
malsony authored Dec 1, 2023
1 parent 88fb3db commit 65424c7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bot/xunfei/xunfei_spark_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ def __init__(self):
self.app_id = conf().get("xunfei_app_id")
self.api_key = conf().get("xunfei_api_key")
self.api_secret = conf().get("xunfei_api_secret")
# 默认使用v3.0版本,2.0版本可设置为generalv2, 1.5版本可设置为 general
self.domain = "generalv2"
# 默认使用v3.0版本,1.5版本可设置为 "ws://spark-api.xf-yun.com/v1.1/chat",
# 2.0版本可设置为 "ws://spark-api.xf-yun.com/v2.1/chat"
# 默认使用v2.0版本: "generalv2"
# v1.5版本为 "general"
# v3.0版本为: "generalv3"
self.domain = "generalv3"
# 默认使用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"
self.host = urlparse(self.spark_url).netloc
self.path = urlparse(self.spark_url).path
Expand Down

0 comments on commit 65424c7

Please sign in to comment.