chore: send a notice to user indicating that the current channel type does not support testing
This commit is contained in:
parent
889af8b2db
commit
bc2f48b1f2
@ -16,6 +16,14 @@ import (
|
|||||||
|
|
||||||
func testChannel(channel *model.Channel, request ChatRequest) (error, *OpenAIError) {
|
func testChannel(channel *model.Channel, request ChatRequest) (error, *OpenAIError) {
|
||||||
switch channel.Type {
|
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:
|
case common.ChannelTypeAzure:
|
||||||
request.Model = "gpt-35-turbo"
|
request.Model = "gpt-35-turbo"
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user