UNPKG

llamaindex

Version:

<p align="center"> <img height="100" width="100" alt="LlamaIndex logo" src="https://ts.llamaindex.ai/square.svg" /> </p> <h1 align="center">LlamaIndex.TS</h1> <h3 align="center"> Data framework for your LLM application. </h3>

20 lines (19 loc) 726 B
import type { MessageContent } from "@llamaindex/core/llms"; import type { BaseNodePostprocessor } from "@llamaindex/core/postprocessor"; import type { NodeWithScore } from "@llamaindex/core/schema"; interface JinaAIRerankerResult { index: number; document?: { text?: string; }; relevance_score: number; } export declare class JinaAIReranker implements BaseNodePostprocessor { model: string; topN?: number; apiKey?: string; constructor(init?: Partial<JinaAIReranker>); rerank(query: string, documents: string[], topN?: number | undefined): Promise<JinaAIRerankerResult[]>; postprocessNodes(nodes: NodeWithScore[], query?: MessageContent): Promise<NodeWithScore[]>; } export {};