diff --git a/ai-provider/model-runtime/provider.go b/ai-provider/model-runtime/provider.go index db19f849..226719eb 100644 --- a/ai-provider/model-runtime/provider.go +++ b/ai-provider/model-runtime/provider.go @@ -55,10 +55,10 @@ func NewProvider(providerData string, modelContents map[string]eosc.Untyped[stri } delete(modelContents, DirAssets) - providerLogo, ok := assetsFiles.Get(providerCfg.IconLarge[entity.LanguageEnglish]) - if !ok { - return nil, fmt.Errorf("provider logo not found:%s", providerCfg.Provider) - } + //providerLogo, ok := assetsFiles.Get(providerCfg.IconLarge[entity.LanguageEnglish]) + //if !ok { + // return nil, fmt.Errorf("provider logo not found:%s", providerCfg.Provider) + //} modelLogo, ok := assetsFiles.Get(providerCfg.IconSmall[entity.LanguageEnglish]) if !ok { return nil, fmt.Errorf("model logo not found:%s", providerCfg.Provider) @@ -66,7 +66,7 @@ func NewProvider(providerData string, modelContents map[string]eosc.Untyped[stri provider := &Provider{ id: providerCfg.Provider, name: providerCfg.Label[entity.LanguageEnglish], - logo: providerLogo, + logo: modelLogo, helpUrl: providerCfg.Help.URL[entity.LanguageEnglish], models: eosc.BuildUntyped[string, IModel](), defaultModels: eosc.BuildUntyped[string, IModel](), diff --git a/stores/api/model.go b/stores/api/model.go index 8ad0c610..0c81e9db 100644 --- a/stores/api/model.go +++ b/stores/api/model.go @@ -13,9 +13,9 @@ type API struct { Creator string `gorm:"size:36;not null;column:creator;comment:创建人;index:creator" aovalue:"creator"` // 创建人 CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"` IsDelete int `gorm:"type:tinyint(1);not null;column:is_delete;comment:是否删除 0:未删除 1:已删除"` - Method []string `gorm:"size:36;not null;column:method;comment:请求方法;serializer:json"` + Method []string `gorm:"size:255;not null;column:method;comment:请求方法;serializer:json"` Protocol []string `gorm:"type:text;not null;column:protocol;comment:协议;serializer:json"` - Path string `gorm:"size:512;not null;column:path;comment:请求路径"` + Path string `gorm:"size:255;not null;column:path;comment:请求路径"` } type Info struct { Id int64 `gorm:"column:id;type:BIGINT(20);NOT NULL;comment:id;primary_key;comment:主键ID;"` @@ -25,8 +25,8 @@ type Info struct { Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"` Team string `gorm:"size:36;not null;column:team;comment:团队;index:team"` // 团队id Upstream string `gorm:"size:36;not null;column:upstream;comment:上游;index:upstream"` - Method []string `gorm:"size:36;not null;column:method;comment:请求方法;serializer:json" ` - Path string `gorm:"size:512;not null;column:path;comment:请求路径"` + Method []string `gorm:"size:255;not null;column:method;comment:请求方法;serializer:json" ` + Path string `gorm:"size:255;not null;column:path;comment:请求路径"` Protocol []string `gorm:"type:text;null;column:protocol;comment:协议;serializer:json"` Match string `gorm:"type:text;null;column:match;comment:匹配规则"` Creator string `gorm:"size:36;not null;column:creator;comment:创建人;index:creator" aovalue:"creator"` // 创建人 @@ -74,7 +74,7 @@ type AiAPIInfo struct { Uuid string `gorm:"type:varchar(36);not null;column:uuid;uniqueIndex:uuid;comment:UUID"` Name string `gorm:"type:varchar(100);not null;column:name;comment:name"` Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"` - Path string `gorm:"size:512;not null;column:path;comment:请求路径"` + Path string `gorm:"size:255;not null;column:path;comment:请求路径"` Description string `gorm:"size:255;not null;column:description;comment:description"` Timeout int `gorm:"type:int(11);not null;column:timeout;comment:超时时间"` Retry int `gorm:"type:int(11);not null;column:retry;comment:重试次数"`