Class: JinaAIReranker
Implements
Constructors
new JinaAIReranker()
new JinaAIReranker(
init
?):JinaAIReranker
Parameters
• init?: Partial
<JinaAIReranker
>
Returns
Source
packages/core/src/postprocessors/rerankers/JinaAIReranker.ts:19
Properties
apiKey?
optional
apiKey:string
=undefined
Source
packages/core/src/postprocessors/rerankers/JinaAIReranker.ts:17
model
model:
string
="jina-reranker-v1-base-en"
Source
packages/core/src/postprocessors/rerankers/JinaAIReranker.ts:15
topN?
optional
topN:number
Source
packages/core/src/postprocessors/rerankers/JinaAIReranker.ts:16
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?: string
Optional query string.
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Implementation of
BaseNodePostprocessor
. postprocessNodes
Source
packages/core/src/postprocessors/rerankers/JinaAIReranker.ts:63
rerank()
rerank(
query
,documents
,topN
):Promise
<JinaAIRerankerResult
[]>
Parameters
• query: string
• documents: string
[]
• topN: undefined
| number
= undefined
Returns
Promise
<JinaAIRerankerResult
[]>
Source
packages/core/src/postprocessors/rerankers/JinaAIReranker.ts:31