refactor: moved registries into a separate module and code cleanup
fix: refactored dial provider to follow the same pattern
This commit is contained in:
19
providers/registries/dial.py
Normal file
19
providers/registries/dial.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Registry loader for DIAL provider capabilities."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ..shared import ProviderType
|
||||
from .base import CapabilityModelRegistry
|
||||
|
||||
|
||||
class DialModelRegistry(CapabilityModelRegistry):
|
||||
"""Capability registry backed by ``conf/dial_models.json``."""
|
||||
|
||||
def __init__(self, config_path: str | None = None) -> None:
|
||||
super().__init__(
|
||||
env_var_name="DIAL_MODELS_CONFIG_PATH",
|
||||
default_filename="dial_models.json",
|
||||
provider=ProviderType.DIAL,
|
||||
friendly_prefix="DIAL ({model})",
|
||||
config_path=config_path,
|
||||
)
|
||||
Reference in New Issue
Block a user