Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("model not found in registry")
Functions ¶
This section is empty.
Types ¶
type ModelDescriptor ¶
type ModelDescriptor struct {
ID string `json:"id,omitempty" example:"m1a2b3c4-d5e6-f7g8-h9i0-j1k2l3m4n5o6"`
Name string `json:"name" example:"qwen2.5-1.5b"`
SourceURL string `json:"sourceUrl" example:"https://huggingface.co/Qwen/..."`
SizeBytes int64 `json:"sizeBytes" example:"934000000"`
Curated bool `json:"curated" example:"true"`
}
type Registry ¶
type Registry interface {
// Resolve returns the descriptor for name from curated or user-added entries.
Resolve(ctx context.Context, name string) (*ModelDescriptor, error)
// List returns all known descriptors (curated + user-added). User entries override curated SourceURL.
List(ctx context.Context) ([]ModelDescriptor, error)
// OptimalFor returns the best registry name for an arbitrary model name string.
// Exact match → family mapping → fallback.
OptimalFor(ctx context.Context, modelName string) (string, error)
}
func New ¶
func New(svc modelregistryservice.Service) Registry
Click to show internal directories.
Click to hide internal directories.