Skip to content

Commit

Permalink
Bugfix/OverrideConfig for Upsert Vector (#3527)
Browse files Browse the repository at this point in the history
* update bugfix for override config vars

* add overrideConfig to upsert vector
  • Loading branch information
HenryHengZJ authored Nov 16, 2024
1 parent 47e723b commit bc77e40
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/server/src/utils/upsertVector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
getMemorySessionId,
getAppVersion,
getTelemetryFlowObj,
getStartingNodes
getStartingNodes,
getAPIOverrideConfig
} from '../utils'
import { validateChatflowAPIKey } from './validateKey'
import { IncomingInput, INodeDirectedGraph, IReactFlowObject, ChatType } from '../Interface'
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit bc77e40

Please sign in to comment.