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,
getAppVersion,
getTelemetryFlowObj,
getStartingNodes
getStartingNodes,
getAPIOverrideConfig
} from '../utils'
import { validateChatflowAPIKey } from './validateKey'
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)
/*** Get API Config ***/
const { nodeOverrides, variableOverrides, apiOverrideStatus } = getAPIOverrideConfig(chatflow)
const upsertedResult = await buildFlow({
startingNodeIds,
reactFlowNodes: nodes,
@@ -170,6 +174,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
chatflowid,
appDataSource: appServer.AppDataSource,
overrideConfig: incomingInput?.overrideConfig,
apiOverrideStatus,
nodeOverrides,
variableOverrides,
cachePool: appServer.cachePool,
isUpsert,
stopNodeId