Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelServiceProvider ¶
type ModelServiceProvider interface {
// engine lifecycle management
InstallEngine() error
StartEngine(mode string) error
StopEngine() error
HealthCheck() error
InitEnv() error
// model management
PullModel(ctx context.Context, req *types.PullModelRequest, fn types.PullProgressFunc) (*types.ProgressResponse, error)
PullModelStream(ctx context.Context, req *types.PullModelRequest) (chan []byte, chan error)
DeleteModel(ctx context.Context, req *types.DeleteRequest) error
ListModels(ctx context.Context) (*types.ListResponse, error)
LoadModel(ctx context.Context, req *types.LoadRequest) error
UnloadModel(ctx context.Context, req *types.UnloadModelRequest) error
GetRunningModels(ctx context.Context) (*types.ListResponse, error)
// config and version
GetConfig() *types.EngineRecommendConfig
GetVersion(ctx context.Context, resp *types.EngineVersionResponse) (*types.EngineVersionResponse, error)
}
ModelServiceProvider model service provider interface
func GetModelEngine ¶
func GetModelEngine(engineName string) ModelServiceProvider
GetModelEngine get model service provider by engine name
Click to show internal directories.
Click to hide internal directories.