mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
fix: ai deploy bug
This commit is contained in:
@@ -149,3 +149,18 @@ func (i *LocalModelPackage) TableName() string {
|
||||
func (i *LocalModelPackage) IdValue() int64 {
|
||||
return i.Id
|
||||
}
|
||||
|
||||
type LocalModelCache struct {
|
||||
Id int64 `gorm:"column:id;type:BIGINT(20);AUTO_INCREMENT;NOT NULL;comment:id;primary_key;comment:主键ID;"`
|
||||
Model string `gorm:"type:varchar(100);not null;column:model;comment:模型ID"`
|
||||
Target string `gorm:"type:varchar(100);not null;column:target;comment:目标"`
|
||||
Type int `gorm:"type:tinyint(1);not null;column:type;comment:类型,0: 服务"`
|
||||
}
|
||||
|
||||
func (i *LocalModelCache) TableName() string {
|
||||
return "ai_local_model_cache"
|
||||
}
|
||||
|
||||
func (i *LocalModelCache) IdValue() int64 {
|
||||
return i.Id
|
||||
}
|
||||
|
||||
@@ -63,6 +63,14 @@ type imlLocalModelInstallStateStore struct {
|
||||
store.SearchStore[LocalModelInstallState]
|
||||
}
|
||||
|
||||
type ILocalModelCacheStore interface {
|
||||
store.IBaseStore[LocalModelCache]
|
||||
}
|
||||
|
||||
type imlLocalModelCacheStore struct {
|
||||
store.Store[LocalModelCache]
|
||||
}
|
||||
|
||||
func init() {
|
||||
autowire.Auto[IProviderStore](func() reflect.Value {
|
||||
return reflect.ValueOf(new(imlProviderStore))
|
||||
@@ -91,4 +99,8 @@ func init() {
|
||||
autowire.Auto[ILocalModelInstallStateStore](func() reflect.Value {
|
||||
return reflect.ValueOf(new(imlLocalModelInstallStateStore))
|
||||
})
|
||||
|
||||
autowire.Auto[ILocalModelCacheStore](func() reflect.Value {
|
||||
return reflect.ValueOf(new(imlLocalModelCacheStore))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user