Skip to content

Commit

Permalink
feat: support xunfei v3 (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaricoHan authored Oct 29, 2023
1 parent 89d458b commit aec343d
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 aec343d

Please sign in to comment.