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

This commit is contained in:
CaIon committed 2024-05-13 14:32:32 +08:00
1 parent 699e29e229
commit 5cf33f35ae
5 files changed
+11 -17

No files matched your search

+2 -2
View File
@@ -138,8 +138,8 @@ func init() {
}
channelId2Models = make(map[int][]string)
for i := 1; i <= common.ChannelTypeDummy; i++ {
apiType := relayconstant.ChannelType2APIType(i)
if apiType == -1 || apiType == relayconstant.APITypeAIProxyLibrary {
apiType, success := relayconstant.ChannelType2APIType(i)
if !success || apiType == relayconstant.APITypeAIProxyLibrary {
continue
}
meta := &relaycommon.RelayInfo{ChannelType: i}