Merge branch 'songquanpeng:main' into main

This commit is contained in:
wood chen 2023-10-31 03:41:51 -05:00 committed by GitHub
commit 4b4ee90162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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