Class: CohereRerank
Implements
Constructors
new CohereRerank()
new CohereRerank(
topN
):CohereRerank
Constructor for CohereRerank.
Parameters
• topN: CohereRerankOptions
Number of nodes to return.
Returns
Defined in
packages/llamaindex/src/postprocessors/rerankers/CohereRerank.ts:30
Properties
apiKey
apiKey:
null
|string
=null
Defined in
packages/llamaindex/src/postprocessors/rerankers/CohereRerank.ts:20
baseUrl
baseUrl:
undefined
|string
Defined in
packages/llamaindex/src/postprocessors/rerankers/CohereRerank.ts:21
model
model:
string
="rerank-english-v2.0"
Defined in
packages/llamaindex/src/postprocessors/rerankers/CohereRerank.ts:19
timeout
timeout:
undefined
|number
Defined in
packages/llamaindex/src/postprocessors/rerankers/CohereRerank.ts:22
topN
topN:
number
=2
Defined in
packages/llamaindex/src/postprocessors/rerankers/CohereRerank.ts:18
Methods
postprocessNodes()
postprocessNodes(
nodes
,query
?):Promise
<NodeWithScore
<Metadata
>[]>
Reranks the nodes using the Cohere API.