Skip to content

Commit

Permalink
Merge pull request lobehub#1 from MaricoHan/ht/dev
Browse files Browse the repository at this point in the history
适配讯飞星火 v3 版本
  • Loading branch information
MartialBE authored Oct 26, 2023
2 parents 1e17944 + cb3e9b8 commit 12499aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/relay-xunfei.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ func getXunfeiAuthUrl(c *gin.Context, apiKey string, apiSecret string) (string,
common.SysLog("api_version not found, use default: " + apiVersion)
}
domain := "general"
if apiVersion == "v2.1" {
domain = "generalv2"
if apiVersion != "v1.1" {
domain += strings.Split(apiVersion, ".")[0]
}
authUrl := buildXunfeiAuthUrl(fmt.Sprintf("wss://spark-api.xf-yun.com/%s/chat", apiVersion), apiKey, apiSecret)
return domain, authUrl
Expand Down

0 comments on commit 12499aa

Please sign in to comment.