Skip to content

RemoteInputConfig

Base classes

Name Children Inherits
BaseModelConfig
llmling_models_config.configs
Base for model configurations.

⋔ Inheritance diagram

graph TD
  4015472173["configs.RemoteInputConfig"]
  3497727833["configs.BaseModelConfig"]
  330168112["schema.Schema"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  3497727833 --> 4015472173
  330168112 --> 3497727833
  3879467795 --> 330168112
  2751680898 --> 3879467795

🛈 DocStrings

Bases: BaseModelConfig

Configuration for remote human input.

Source code in src/llmling_models_config/configs.py
class RemoteInputConfig(BaseModelConfig):
    """Configuration for remote human input."""

    model_config = ConfigDict(json_schema_extra={"x-doc-title": "Remote input model"})

    type: Literal["remote-input"] = Field(default="remote-input", init=False)
    """Type identifier for remote input model."""

    url: str = Field(
        default="ws://localhost:8000/v1/chat/stream",
        examples=["ws://localhost:8000/v1/chat/stream", "wss://api.example.com/chat"],
        title="WebSocket URL",
    )
    """WebSocket URL for connecting to the remote input service."""

    api_key: SecretStr | None = Field(default=None, title="API key", examples=["abc123"])
    """Optional API key for authentication."""

    def get_model(self) -> Any:
        from llmling_models.models.remote_input import RemoteInputModel

        key = self.api_key.get_secret_value() if self.api_key else None
        return RemoteInputModel(url=self.url, api_key=key)

api_key class-attribute instance-attribute

api_key: SecretStr | None = Field(default=None, title='API key', examples=['abc123'])

Optional API key for authentication.

type class-attribute instance-attribute

type: Literal['remote-input'] = Field(default='remote-input', init=False)

Type identifier for remote input model.

url class-attribute instance-attribute

url: str = Field(
    default="ws://localhost:8000/v1/chat/stream",
    examples=["ws://localhost:8000/v1/chat/stream", "wss://api.example.com/chat"],
    title="WebSocket URL",
)

WebSocket URL for connecting to the remote input service.

:fa-brands-github: Show source on GitHub