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