mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Bugfix/In-mem VS not able to load document (#2542)
fix where in-mem VS not able to load document
This commit is contained in:
@@ -379,6 +379,7 @@ export const saveUpsertFlowData = (nodeData: INodeData, upsertHistory: Record<st
|
|||||||
/**
|
/**
|
||||||
* Check if doc loader should be bypassed, ONLY if doc loader is connected to a vector store
|
* Check if doc loader should be bypassed, ONLY if doc loader is connected to a vector store
|
||||||
* Reason being we dont want to load the doc loader again whenever we are building the flow, because it was already done during upserting
|
* Reason being we dont want to load the doc loader again whenever we are building the flow, because it was already done during upserting
|
||||||
|
* EXCEPT if the vector store is a memory vector store
|
||||||
* TODO: Remove this logic when we remove doc loader nodes from the canvas
|
* TODO: Remove this logic when we remove doc loader nodes from the canvas
|
||||||
* @param {IReactFlowNode} reactFlowNode
|
* @param {IReactFlowNode} reactFlowNode
|
||||||
* @param {IReactFlowNode[]} reactFlowNodes
|
* @param {IReactFlowNode[]} reactFlowNodes
|
||||||
@@ -406,7 +407,8 @@ const checkIfDocLoaderShouldBeIgnored = (
|
|||||||
|
|
||||||
if (targetNodeId) {
|
if (targetNodeId) {
|
||||||
const targetNodeCategory = reactFlowNodes.find((nd) => nd.id === targetNodeId)?.data.category || ''
|
const targetNodeCategory = reactFlowNodes.find((nd) => nd.id === targetNodeId)?.data.category || ''
|
||||||
if (targetNodeCategory === 'Vector Stores') {
|
const targetNodeName = reactFlowNodes.find((nd) => nd.id === targetNodeId)?.data.name || ''
|
||||||
|
if (targetNodeCategory === 'Vector Stores' && targetNodeName !== 'memoryVectorStore') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user