mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-20 18:46:38 +08:00
parent
864c53e3e9
commit
3effdef34a
@ -48,6 +48,7 @@ type OpenAIModels struct {
|
|||||||
Parent *string `json:"parent"`
|
Parent *string `json:"parent"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BUG: 更新 custom channel 时,应该同步更新所有自定义的 models 到 allModels
|
||||||
var allModels []OpenAIModels
|
var allModels []OpenAIModels
|
||||||
var modelsMap map[string]OpenAIModels
|
var modelsMap map[string]OpenAIModels
|
||||||
var channelId2Models map[int][]string
|
var channelId2Models map[int][]string
|
||||||
@ -177,8 +178,6 @@ func ListModels(c *gin.Context) {
|
|||||||
// Filter models that match user's abilities with EXACT model+channel matches
|
// Filter models that match user's abilities with EXACT model+channel matches
|
||||||
userAvailableModels := make([]OpenAIModels, 0)
|
userAvailableModels := make([]OpenAIModels, 0)
|
||||||
|
|
||||||
fmt.Println(allModels)
|
|
||||||
|
|
||||||
// Only include models that have a matching model+channel combination
|
// Only include models that have a matching model+channel combination
|
||||||
for _, model := range allModels {
|
for _, model := range allModels {
|
||||||
key := model.Id + ":" + model.OwnedBy
|
key := model.Id + ":" + model.OwnedBy
|
||||||
|
Loading…
Reference in New Issue
Block a user