Skip to main content

Module registry

Module registry 

Source
Expand description

Provider registry and custom providers.

A ProviderRegistry resolves provider:model ids across several providers; custom_provider builds a provider from explicit model instances; set_default_registry installs the registry used to resolve bare model-id strings.

Structs§

CustomProvider
A provider that serves pre-built model instances, optionally falling back to another provider for unknown ids.
CustomProviderBuilder
Builder of a CustomProvider.
ProviderRegistry
Resolves model ids of the form <provider><separator><model>.
ProviderRegistryBuilder
Builder of a ProviderRegistry.

Functions§

create_provider_registry
Creates a registry from (id, provider) pairs with the default separator :.
custom_provider
Starts building a provider named id.
default_registry
The default registry, if one was installed.
set_default_registry
Installs the registry used to resolve model ids passed as strings.