graph LR
rank["rank"]
score["score"]
_format_payload["_format_payload"]
_parse_response["_parse_response"]
_get_score["_get_score"]
rank -- "calls" --> _format_payload
rank -- "calls" --> _parse_response
score -- "calls" --> _format_payload
score -- "calls" --> _parse_response
_parse_response -- "calls" --> _get_score
The API Reranker Clients subsystem is primarily encapsulated within the rerankers.models.api_rankers module, specifically the api_rankers.py file. This module is responsible for handling all interactions with external reranking APIs, including request formatting, execution, and response parsing.
The primary public interface for performing a full reranking operation by orchestrating the entire process of payload formatting, API request execution, and response parsing. It acts as a facade for the complex API interaction logic.
Related Classes/Methods:
A public interface providing a more granular method to obtain a single reranking score for a given query-document pair from an external API. It leverages the same underlying formatting and parsing mechanisms as rank.
Related Classes/Methods:
An internal helper component responsible for transforming the internal data structures (query, documents) into the specific request format (e.g., JSON) required by the target external reranking API. It ensures compatibility with various API specifications.
Related Classes/Methods:
An internal helper component that handles the deserialization and initial interpretation of the raw API response received from external reranking services. It converts the external API's response into a usable internal representation.
Related Classes/Methods:
A specialized internal helper component, called by _parse_response, designed specifically to extract the numerical reranking score from the parsed API response data. It isolates the logic for score retrieval.
Related Classes/Methods: