From bc2f48b1f290ceadcf3edfa99a48aeaedf3a0a3d Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 23 Jul 2023 23:23:56 +0800 Subject: [PATCH] chore: send a notice to user indicating that the current channel type does not support testing --- controller/channel-test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controller/channel-test.go b/controller/channel-test.go index 4225dd6c7a..be658fa80c 100644 --- a/controller/channel-test.go +++ b/controller/channel-test.go @@ -16,6 +16,14 @@ import ( func testChannel(channel *model.Channel, request ChatRequest) (error, *OpenAIError) { switch channel.Type { + case common.ChannelTypePaLM: + fallthrough + case common.ChannelTypeAnthropic: + fallthrough + case common.ChannelTypeBaidu: + fallthrough + case common.ChannelTypeZhipu: + return errors.New("该渠道类型当前版本不支持测试,请手动测试"), nil case common.ChannelTypeAzure: request.Model = "gpt-35-turbo" default: