Rerank ====== .. autoclass:: ibm_watsonx_ai.foundation_models.rerank.Rerank :members: :exclude-members: :undoc-members: :show-inheritance: Enums ----- .. class:: RerankModels Bases: ``StrEnum`` This represents a dynamically generated Enum for Rerank Models. **Example of getting RerankModels** .. code-block:: python # GET RerankModels ENUM client.foundation_models.RerankModels # PRINT dict of Enums client.foundation_models.RerankModels.show() **Example Output:** .. code-block:: {'MS_MARCO_MINILM_L_12_V2': 'cross-encoder/ms-marco-minilm-l-12-v2', ... 'ALL_MINILM_L6_V2': 'sentence-transformers/all-minilm-l6-v2'} **Example of initialising Rerank with RerankModels Enum:** .. code-block:: python from ibm_watsonx_ai.foundation_models import Rerank rerank = Rerank( model_id=client.foundation_models.RerankModels.MS_MARCO_MINILM_L_12_V2, credentials=Credentials(...), project_id=project_id, )