provider

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL