Class: JinaAIReranker
Implements
Constructors
new JinaAIReranker()
new JinaAIReranker(
init
?):JinaAIReranker
Parameters
• init?: Partial
<JinaAIReranker
>
Returns
Defined in
packages/llamaindex/src/postprocessors/rerankers/JinaAIReranker.ts:21
Properties
apiKey?
optional
apiKey:string
=undefined
Defined in
packages/llamaindex/src/postprocessors/rerankers/JinaAIReranker.ts:19
model
model:
string
="jina-reranker-v1-base-en"
Defined in
packages/llamaindex/src/postprocessors/rerankers/JinaAIReranker.ts:17
topN?
optional
topN:number
Defined in
packages/llamaindex/src/postprocessors/rerankers/JinaAIReranker.ts:18
Methods
postprocessNodes()
postprocessNodes(
nodes
,query
?):Promise
<NodeWithScore
<Metadata
>[]>
Send message along with the class's current chat history to the LLM. This version returns a promise for asynchronous operation.
Parameters
• nodes: NodeWithScore
<Metadata
>[]
Array of nodes with scores.
• query?: MessageContent
Optional query string.
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Implementation of
BaseNodePostprocessor
.postprocessNodes
Defined in
packages/llamaindex/src/postprocessors/rerankers/JinaAIReranker.ts:65
rerank()
rerank(
query
,documents
,topN
):Promise
<JinaAIRerankerResult
[]>
Parameters
• query: string
• documents: string
[]
• topN: undefined
| number
= ...
Returns
Promise
<JinaAIRerankerResult
[]>
Defined in
packages/llamaindex/src/postprocessors/rerankers/JinaAIReranker.ts:33