Builds a rerank provider instance (DeepInfra, vLLM, or DashScope) from RerankSettings config, enabling pluggable reranking backends.
# Source: https://github.com/EverMind-AI/EverOS | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Factory for building a rerank provider from :class:`RerankSettings`.
The ``provider`` field on :class:`RerankSettings` selects which concrete
implementation to build:
- ``"deepinfra"`` → :class:`DeepInfraRerankProvider`
- ``"vllm"`` → :class:`VllmRerankProvider`
- ``"dashscope"`` → :class:`DashScopeRerankProvider`
Adding a new provider = one match arm here + one new file under
:mod:`everos.component.rerank`.
"""
from __future__ import annotations
from everos.component.utils.config_hints import missing_config_error
from everos.config import RerankSettings
from
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key