Skip to content

Commit 12499aa

Browse files
authored
Merge pull request lobehub#1 from MaricoHan/ht/dev
适配讯飞星火 v3 版本
2 parents 1e17944 + cb3e9b8 commit 12499aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controller/relay-xunfei.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ func getXunfeiAuthUrl(c *gin.Context, apiKey string, apiSecret string) (string,
298298
common.SysLog("api_version not found, use default: " + apiVersion)
299299
}
300300
domain := "general"
301-
if apiVersion == "v2.1" {
302-
domain = "generalv2"
301+
if apiVersion != "v1.1" {
302+
domain += strings.Split(apiVersion, ".")[0]
303303
}
304304
authUrl := buildXunfeiAuthUrl(fmt.Sprintf("wss://spark-api.xf-yun.com/%s/chat", apiVersion), apiKey, apiSecret)
305305
return domain, authUrl

0 commit comments

Comments
 (0)