Skip to content

Commit

Permalink
feat: 新增讯飞v4.0,v3.5 (#1145)
Browse files Browse the repository at this point in the history
fix: 修复if elif 判断
  • Loading branch information
ZhengQinyu authored Jul 24, 2024
1 parent a7c3971 commit ee2daa3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/models/spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ def __init__(self, model_name, appid, api_key, api_secret, user_name="") -> None
if "2.0" in self.model_name:
self.spark_url = "wss://spark-api.xf-yun.com/v2.1/chat"
self.domain = "generalv2"
if "3.0" in self.model_name:
elif "3.0" in self.model_name:
self.spark_url = "wss://spark-api.xf-yun.com/v3.1/chat"
self.domain = "generalv3"
elif "3.5" in self.model_name:
self.spark_url = "wss://spark-api.xf-yun.com/v3.5/chat"
self.domain = "generalv3.5"
elif "4.0" in self.model_name:
self.spark_url = "wss://spark-api.xf-yun.com/v4.0/chat"
self.domain = "4.0Ultra"
else:
self.spark_url = "wss://spark-api.xf-yun.com/v1.1/chat"
self.domain = "general"
Expand Down
4 changes: 4 additions & 0 deletions modules/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
"yuanai-1.0-rhythm_poems",
"minimax-abab5-chat",
"midjourney",
"讯飞星火大模型V4.0",
"讯飞星火大模型V3.5",
"讯飞星火大模型V3.0",
"讯飞星火大模型V2.0",
"讯飞星火大模型V1.5",
Expand Down Expand Up @@ -380,6 +382,8 @@
"yuanai-1.0-rhythm_poems": {"model_name": "yuanai-1.0-rhythm_poems"},
"minimax-abab5-chat": {"model_name": "minimax-abab5-chat"},
"midjourney": {"model_name": "midjourney"},
"讯飞星火大模型V4.0": {"model_name": "讯飞星火大模型V4.0"},
"讯飞星火大模型V3.5": {"model_name": "讯飞星火大模型V3.5"},
"讯飞星火大模型V3.0": {"model_name": "讯飞星火大模型V3.0"},
"讯飞星火大模型V2.0": {"model_name": "讯飞星火大模型V2.0"},
"讯飞星火大模型V1.5": {"model_name": "讯飞星火大模型V1.5"},
Expand Down

0 comments on commit ee2daa3

Please sign in to comment.