fix: 修复自定义渠道出错 #243

This commit is contained in:
CaIon
2024-05-13 14:32:32 +08:00
parent e8800415b8
commit fd19798c92
5 changed files with 11 additions and 17 deletions

View File

@@ -53,7 +53,7 @@ func testChannel(channel *model.Channel, testModel string) (err error, openaiErr
}
meta := relaycommon.GenRelayInfo(c)
apiType := constant.ChannelType2APIType(channel.Type)
apiType, _ := constant.ChannelType2APIType(channel.Type)
adaptor := relay.GetAdaptor(apiType)
if adaptor == nil {
return fmt.Errorf("invalid api type: %d, adaptor is nil", apiType), nil