From cb2a597547b262f859a209cc7bf540dbbaee53af Mon Sep 17 00:00:00 2001 From: abc Date: Wed, 25 Oct 2023 10:08:38 +0800 Subject: [PATCH] =?UTF-8?q?fixed(xunfei):=20=E6=94=AF=E6=8C=81=E7=A7=91?= =?UTF-8?q?=E5=A4=A7=E8=AE=AF=E9=A3=9E3.0=E7=9A=84=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/relay-xunfei.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/relay-xunfei.go b/controller/relay-xunfei.go index cbaf38fe..f4e70934 100644 --- a/controller/relay-xunfei.go +++ b/controller/relay-xunfei.go @@ -297,10 +297,14 @@ func getXunfeiAuthUrl(c *gin.Context, apiKey string, apiSecret string) (string, apiVersion = "v1.1" common.SysLog("api_version not found, use default: " + apiVersion) } + domain := "general" if apiVersion == "v2.1" { domain = "generalv2" } + if apiVersion == "v3.1" { + domain = "generalv3" + } authUrl := buildXunfeiAuthUrl(fmt.Sprintf("wss://spark-api.xf-yun.com/%s/chat", apiVersion), apiKey, apiSecret) return domain, authUrl }