genai.text.experimental.rerank.rerank_service module#

class genai.text.experimental.rerank.rerank_service.RerankService[source]#

Bases: BaseService[BaseServiceConfig, BaseServiceServices]

EXPERIMENTAL Text rerank service, this service may change in the near future.

create(*, model_id, query, documents, parameters=None)[source]#
Parameters:
  • model_id (str) –

  • query (str) –

  • documents (list[str]) –

  • parameters (TextRerankParameters | None) –

Return type:

TextRerankCreateResponse