Add rerank API for NVIDIA Inference Provider

This commit is contained in:
Jiayi 2025-09-03 17:34:05 -07:00
parent ce77c27ff8
commit bab9d7aaea
9 changed files with 9213 additions and 1 deletions

View file

@ -1016,7 +1016,7 @@ class InferenceProvider(Protocol):
) -> RerankResponse:
"""Rerank a list of documents based on their relevance to a query.
:param model: The identifier of the reranking model to use.
:param model: The identifier of the reranking model to use. The model must be a reranking model registered with Llama Stack and available via the /models endpoint.
:param query: The search query to rank items against. Can be a string, text content part, or image content part. The input must not exceed the model's max input token length.
:param items: List of items to rerank. Each item can be a string, text content part, or image content part. Each input must not exceed the model's max input token length.
:param max_num_results: (Optional) Maximum number of results to return. Default: returns all.