/** * @example * { * query: "query", * documents: ["documents"], * model: "model" * } */ export interface RerankRequest { /** The query as a string. The query can contain a maximum of 8,000 tokens for `rerank-2.5` and `rerank-2.5-lite`; 4,000 tokens for `rerank-2`; 2,000 tokens for `rerank-2-lite` and `rerank-1`; and 1,000 tokens for `rerank-lite-1`. */ query: string; /** The documents to be reranked as a list of strings. */ documents: string[]; /** Name of the model. Recommended options: `rerank-2.5`, `rerank-2.5-lite`. */ model: string; /** The number of most relevant documents to return. If not specified, the reranking results of all documents will be returned. */ topK?: number; /** Whether to return the documents in the response. Defaults to `false`. */ returnDocuments?: boolean; /** Whether to truncate the input to satisfy the "context length limit" on the query and the documents. Defaults to `true`. */ truncation?: boolean; }