feat: Add Cohere reranking capability to vector stores (#16014)

Co-authored-by: Yiorgis Gozadinos <yiorgis@n8n.io>
Co-authored-by: Mutasem Aldmour <mutasem@n8n.io>
This commit is contained in:
Benjamin Schroth
2025-06-05 10:16:22 +02:00
committed by GitHub
parent 47ad74d137
commit 8a1cabe62a
14 changed files with 585 additions and 20 deletions

View File

@@ -1871,6 +1871,7 @@ export const NodeConnectionTypes = {
AiMemory: 'ai_memory',
AiOutputParser: 'ai_outputParser',
AiRetriever: 'ai_retriever',
AiReranker: 'ai_reranker',
AiTextSplitter: 'ai_textSplitter',
AiTool: 'ai_tool',
AiVectorStore: 'ai_vectorStore',
@@ -1881,20 +1882,7 @@ export type NodeConnectionType = (typeof NodeConnectionTypes)[keyof typeof NodeC
export type AINodeConnectionType = Exclude<NodeConnectionType, typeof NodeConnectionTypes.Main>;
export const nodeConnectionTypes: NodeConnectionType[] = [
NodeConnectionTypes.AiAgent,
NodeConnectionTypes.AiChain,
NodeConnectionTypes.AiDocument,
NodeConnectionTypes.AiEmbedding,
NodeConnectionTypes.AiLanguageModel,
NodeConnectionTypes.AiMemory,
NodeConnectionTypes.AiOutputParser,
NodeConnectionTypes.AiRetriever,
NodeConnectionTypes.AiTextSplitter,
NodeConnectionTypes.AiTool,
NodeConnectionTypes.AiVectorStore,
NodeConnectionTypes.Main,
];
export const nodeConnectionTypes: NodeConnectionType[] = Object.values(NodeConnectionTypes);
export interface INodeInputFilter {
// TODO: Later add more filter options like categories, subcatogries,
@@ -2333,6 +2321,7 @@ export type AiEvent =
| 'ai-message-added-to-memory'
| 'ai-output-parsed'
| 'ai-documents-retrieved'
| 'ai-document-reranked'
| 'ai-document-embedded'
| 'ai-query-embedded'
| 'ai-document-processed'