mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-18 17:46:37 +08:00
fix: Refactor: Ignore nil adaptors when initializing OpenAI models map
- Ignore nil adaptors when initializing OpenAI models map
This commit is contained in:
parent
281df64214
commit
79daa892bd
@ -59,6 +59,10 @@ func init() {
|
||||
// https://platform.openai.com/docs/models/model-endpoint-compatibility
|
||||
for i := 0; i < constant.APITypeDummy; i++ {
|
||||
adaptor := helper.GetAdaptor(i)
|
||||
if adaptor == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
channelName := adaptor.GetChannelName()
|
||||
modelNames := adaptor.GetModelList()
|
||||
for _, modelName := range modelNames {
|
||||
|
Loading…
Reference in New Issue
Block a user