Skip to content

Commit bc77e40

Browse files
authored
Bugfix/OverrideConfig for Upsert Vector (#3527)
* update bugfix for override config vars * add overrideConfig to upsert vector
1 parent 47e723b commit bc77e40

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/server/src/utils/upsertVector.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import {
1212
getMemorySessionId,
1313
getAppVersion,
1414
getTelemetryFlowObj,
15-
getStartingNodes
15+
getStartingNodes,
16+
getAPIOverrideConfig
1617
} from '../utils'
1718
import { validateChatflowAPIKey } from './validateKey'
1819
import { IncomingInput, INodeDirectedGraph, IReactFlowObject, ChatType } from '../Interface'
@@ -155,6 +156,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
155156

156157
const { startingNodeIds, depthQueue } = getStartingNodes(filteredGraph, stopNodeId)
157158

159+
/*** Get API Config ***/
160+
const { nodeOverrides, variableOverrides, apiOverrideStatus } = getAPIOverrideConfig(chatflow)
161+
158162
const upsertedResult = await buildFlow({
159163
startingNodeIds,
160164
reactFlowNodes: nodes,
@@ -170,6 +174,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
170174
chatflowid,
171175
appDataSource: appServer.AppDataSource,
172176
overrideConfig: incomingInput?.overrideConfig,
177+
apiOverrideStatus,
178+
nodeOverrides,
179+
variableOverrides,
173180
cachePool: appServer.cachePool,
174181
isUpsert,
175182
stopNodeId

0 commit comments

Comments
 (0)