Skip to content

pelinker.cli.server

LinkDebugRequest

Bases: _LinkTextsBody

Same inputs as /link plus flags matching pelinker.cli.link_files.

Source code in pelinker/cli/server.py
class LinkDebugRequest(_LinkTextsBody):
    """Same inputs as ``/link`` plus flags matching ``pelinker.cli.link_files``."""

    thr_score: float | None = None
    use_gpu: bool | None = None
    max_length: int | None = Field(default=None, ge=1, le=8192)
    include_entity_anomaly_metrics: bool = False
    kb_validation: bool = False

ServerCliConfig dataclass

Hydra/OmegaConf node for the linker HTTP server (aligned with fit CLI).

Source code in pelinker/cli/server.py
@dataclass
class ServerCliConfig:
    """Hydra/OmegaConf node for the linker HTTP server (aligned with ``fit`` CLI)."""

    host: str = "0.0.0.0"
    port: int = 8599
    """Path to the dumped linker **without** ``.gz`` (same as ``Linker.dump`` / ``Linker.load``). If omitted, uses the packaged store path built from ``model_type`` and ``layers_spec``."""
    model_file_spec: str | None = None
    thr_score: float = 0.5
    use_gpu: bool = False
    cors_allow_origins: list[str] = field(default_factory=lambda: ["*"])

port = 8599 class-attribute instance-attribute

Path to the dumped linker without .gz (same as Linker.dump / Linker.load). If omitted, uses the packaged store path built from model_type and layers_spec.