Bugfix/OverrideConfig for Upsert Vector (#3527)

* update bugfix for override config vars

* add overrideConfig to upsert vector
This commit is contained in:
Henry Heng
2024-11-16 18:11:30 +00:00
committed by GitHub
parent 47e723be02
commit bc77e400ed
+8 -1
View File
@@ -12,7 +12,8 @@ import {
getMemorySessionId, getMemorySessionId,
getAppVersion, getAppVersion,
getTelemetryFlowObj, getTelemetryFlowObj,
getStartingNodes getStartingNodes,
getAPIOverrideConfig
} from '../utils' } from '../utils'
import { validateChatflowAPIKey } from './validateKey' import { validateChatflowAPIKey } from './validateKey'
import { IncomingInput, INodeDirectedGraph, IReactFlowObject, ChatType } from '../Interface' import { IncomingInput, INodeDirectedGraph, IReactFlowObject, ChatType } from '../Interface'
@@ -155,6 +156,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
const { startingNodeIds, depthQueue } = getStartingNodes(filteredGraph, stopNodeId) const { startingNodeIds, depthQueue } = getStartingNodes(filteredGraph, stopNodeId)
/*** Get API Config ***/
const { nodeOverrides, variableOverrides, apiOverrideStatus } = getAPIOverrideConfig(chatflow)
const upsertedResult = await buildFlow({ const upsertedResult = await buildFlow({
startingNodeIds, startingNodeIds,
reactFlowNodes: nodes, reactFlowNodes: nodes,
@@ -170,6 +174,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
chatflowid, chatflowid,
appDataSource: appServer.AppDataSource, appDataSource: appServer.AppDataSource,
overrideConfig: incomingInput?.overrideConfig, overrideConfig: incomingInput?.overrideConfig,
apiOverrideStatus,
nodeOverrides,
variableOverrides,
cachePool: appServer.cachePool, cachePool: appServer.cachePool,
isUpsert, isUpsert,
stopNodeId stopNodeId