mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
bc16d7f5ce
Introduce a new interface for fetching model configuration templates to enhance model management flexibility.
24 lines
733 B
Go
24 lines
733 B
Go
package ai_model
|
|
|
|
import (
|
|
model_dto "github.com/APIParkLab/APIPark/module/ai-model/dto"
|
|
"github.com/gin-gonic/gin"
|
|
"reflect"
|
|
|
|
"github.com/eolinker/go-common/autowire"
|
|
)
|
|
|
|
type IProviderModelModule interface {
|
|
AddProviderModel(ctx *gin.Context, provider string, input *model_dto.Model) (*model_dto.SimpleModel, error)
|
|
UpdateProviderModel(ctx *gin.Context, provider string, input *model_dto.EditModel) error
|
|
DeleteProviderModel(ctx *gin.Context, provider string, id string) error
|
|
GetModelParametersTemplate(ctx *gin.Context) ([]*model_dto.ModelParametersTemplate, error)
|
|
}
|
|
|
|
func init() {
|
|
autowire.Auto[IProviderModelModule](func() reflect.Value {
|
|
module := new(imlProviderModelModule)
|
|
return reflect.ValueOf(module)
|
|
})
|
|
}
|