CohereRerank
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:17
BaseNodePostprocessor
new CohereRerank(
topN):CohereRerank
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:30
CohereRerank 的构造函数。
CohereRerankOptions
要返回的节点数量。
CohereRerank
topN:
number=2
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:18
模型:
string="rerank-english-v2.0"
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:19
apiKey
Section titled “apiKey”apiKey:
null|string=null
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:20
baseUrl
Section titled “baseUrl”baseUrl:
undefined|string
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:21
超时:
undefined|number
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:22
postprocessNodes()
Section titled “postprocessNodes()”postprocessNodes(
nodes,query?):Promise<NodeWithScore<Metadata>[]>
定义于:.build/typescript/packages/providers/cohere/src/CohereRerank.ts:64
使用Cohere API对节点进行重新排序。
NodeWithScore<Metadata>[]
带分数的节点数组。
MessageContent
查询字符串。
Promise<NodeWithScore<Metadata>[]>
BaseNodePostprocessor.postprocessNodes