From ce9c8024a6b18bb9b1950da20d1fc6b5f6c2b3a7 Mon Sep 17 00:00:00 2001 From: JustSong Date: Sat, 29 Jul 2023 22:05:15 +0800 Subject: [PATCH] chore: update prompt for xunfei --- controller/relay-xunfei.go | 2 +- web/src/pages/Channel/EditChannel.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/controller/relay-xunfei.go b/controller/relay-xunfei.go index 9343f216..cd55df89 100644 --- a/controller/relay-xunfei.go +++ b/controller/relay-xunfei.go @@ -173,7 +173,7 @@ func buildXunfeiAuthUrl(hostUrl string, apiKey, apiSecret string) string { return callUrl } -func xunfeiStreamHandler(c *gin.Context, textRequest GeneralOpenAIRequest, appId string, apiKey string, apiSecret string) (*OpenAIErrorWithStatusCode, *Usage) { +func xunfeiStreamHandler(c *gin.Context, textRequest GeneralOpenAIRequest, appId string, apiSecret string, apiKey string) (*OpenAIErrorWithStatusCode, *Usage) { var usage Usage d := websocket.Dialer{ HandshakeTimeout: 5 * time.Second, diff --git a/web/src/pages/Channel/EditChannel.js b/web/src/pages/Channel/EditChannel.js index bb0567de..6974315e 100644 --- a/web/src/pages/Channel/EditChannel.js +++ b/web/src/pages/Channel/EditChannel.js @@ -53,6 +53,9 @@ const EditChannel = () => { case 16: localModels = ['chatglm_pro', 'chatglm_std', 'chatglm_lite']; break; + case 18: + localModels = ['SparkDesk']; + break; } setInputs((inputs) => ({ ...inputs, models: localModels })); } @@ -347,7 +350,7 @@ const EditChannel = () => { label='密钥' name='key' required - placeholder={inputs.type === 15 ? '请输入 access token,当前版本暂不支持自动刷新,请每 30 天更新一次' : '请输入渠道对应的鉴权密钥'} + placeholder={inputs.type === 15 ? '请输入 access token,当前版本暂不支持自动刷新,请每 30 天更新一次' : (inputs.type === 18 ? '按照如下格式输入:APPID|APISecret|APIKey' : '请输入渠道对应的鉴权密钥')} onChange={handleInputChange} value={inputs.key} autoComplete='new-password'