Skip to content

Index

intelligence

Intelligence primitive — the model definition and catalog.

Functions

merge_discovered_models

merge_discovered_models(engine_key: str, model_ids: List[str]) -> None

Create minimal ModelSpec entries for models not already in the registry.

Source code in src/openjarvis/intelligence/model_catalog.py
def merge_discovered_models(engine_key: str, model_ids: List[str]) -> None:
    """Create minimal ``ModelSpec`` entries for models not already in the registry."""
    for model_id in model_ids:
        if not ModelRegistry.contains(model_id):
            spec = ModelSpec(
                model_id=model_id,
                name=model_id,
                parameter_count_b=0.0,
                context_length=0,
                supported_engines=(engine_key,),
            )
            ModelRegistry.register_value(model_id, spec)

register_builtin_models

register_builtin_models() -> None

Populate ModelRegistry with well-known models.

Source code in src/openjarvis/intelligence/model_catalog.py
def register_builtin_models() -> None:
    """Populate ``ModelRegistry`` with well-known models."""
    for spec in BUILTIN_MODELS:
        if not ModelRegistry.contains(spec.model_id):
            ModelRegistry.register_value(spec.model_id, spec)