Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ManagedModel ¶
type ManagedModel struct {
ProviderID string `json:"provider_id"`
UpstreamModel string `json:"upstream_model"`
CredentialScope string `json:"credential_scope,omitempty"`
Enabled bool `json:"enabled"`
CapabilityOverrides *provider.ModelCapabilities `json:"capability_overrides,omitempty"`
}
func (*ManagedModel) ModelStorageKey ¶
func (m *ManagedModel) ModelStorageKey() (string, string)
func (*ManagedModel) Normalize ¶
func (m *ManagedModel) Normalize()
type ManagedModelFilter ¶
type ManagedModelFilter struct {
ProviderID string
}
type ProviderModelSnapshot ¶
type ProviderModelSnapshot struct {
ProviderID string `json:"provider_id"`
ProviderType string `json:"provider_type"`
UpstreamModel string `json:"upstream_model"`
DisplayName string `json:"display_name,omitempty"`
Description string `json:"description,omitempty"`
Capabilities provider.ModelCapabilities `json:"capabilities,omitempty"`
Status SnapshotStatus `json:"status"`
FetchedAt time.Time `json:"fetched_at"`
LastError string `json:"last_error,omitempty"`
}
type ResolvedManagedModel ¶
type ResolvedManagedModel struct {
ManagedModel
Snapshot *ProviderModelSnapshot `json:"snapshot,omitempty"`
Capabilities provider.ModelCapabilities `json:"capabilities,omitempty"`
}
type Service ¶
type Service interface {
RefreshProvider(ctx context.Context, providerID string) error
ListManagedModels(ctx context.Context, filter ManagedModelFilter) ([]ManagedModel, error)
GetManagedModel(ctx context.Context, providerID string, upstreamModel string) (*ManagedModel, bool, error)
GetResolvedManagedModel(ctx context.Context, providerID string, upstreamModel string) (*ResolvedManagedModel, bool, error)
CreateManagedModel(ctx context.Context, model ManagedModel) error
UpdateManagedModel(ctx context.Context, model ManagedModel) error
DeleteManagedModel(ctx context.Context, providerID string, upstreamModel string) error
ListProviderSnapshots(ctx context.Context, providerID string) ([]ProviderModelSnapshot, error)
}
func NewService ¶
func NewService(store configstore.ConfigStore, providerMgr providerResolver, logger *zap.Logger) Service
type SnapshotStatus ¶
type SnapshotStatus string
const ( SnapshotStatusOK SnapshotStatus = "ok" SnapshotStatusError SnapshotStatus = "error" )
Click to show internal directories.
Click to hide internal directories.