18 lines
570 B
Python
18 lines
570 B
Python
"""Construct the configured Brain-internal input adapter."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from yovision_brain.config import BrainInputConfig
|
|
|
|
from .local_file import LocalFileInput
|
|
from .models import InputSource
|
|
from .synthetic import SyntheticInput
|
|
|
|
|
|
def build_input_source(config: BrainInputConfig) -> InputSource:
|
|
if config.source.kind == "synthetic":
|
|
return SyntheticInput(config)
|
|
if config.source.kind == "local_file":
|
|
return LocalFileInput(config)
|
|
raise ValueError(f"unsupported Brain input source kind: {config.source.kind}")
|