소스 검색

chore: send a notice to user indicating that the current channel type does not support testing

JustSong 2 년 전
부모
커밋
bc2f48b1f2
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      controller/channel-test.go

+ 8 - 0
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: