mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 01:01:11 +03:00
Chore/remove app server functions from utils file (#3671)
* remove app server functions from utils file * hide override config variables if its empty
This commit is contained in:
@@ -57,6 +57,7 @@ import { getErrorMessage } from '../errors/utils'
|
||||
import { ChatMessage } from '../database/entities/ChatMessage'
|
||||
import { IAction } from 'flowise-components'
|
||||
import { FLOWISE_METRIC_COUNTERS, FLOWISE_COUNTER_STATUS } from '../Interface.Metrics'
|
||||
import { Variable } from '../database/entities/Variable'
|
||||
|
||||
/**
|
||||
* Build Chatflow
|
||||
@@ -350,6 +351,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
||||
const startingNodes = nodes.filter((nd) => startingNodeIds.includes(nd.id))
|
||||
|
||||
/*** Get API Config ***/
|
||||
const availableVariables = await appServer.AppDataSource.getRepository(Variable).find()
|
||||
const { nodeOverrides, variableOverrides, apiOverrideStatus } = getAPIOverrideConfig(chatflow)
|
||||
|
||||
logger.debug(`[server]: Start building chatflow ${chatflowid}`)
|
||||
@@ -373,6 +375,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
||||
overrideConfig: incomingInput?.overrideConfig,
|
||||
apiOverrideStatus,
|
||||
nodeOverrides,
|
||||
availableVariables,
|
||||
variableOverrides,
|
||||
cachePool: appServer.cachePool,
|
||||
isUpsert: false,
|
||||
@@ -427,6 +430,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
||||
chatHistory,
|
||||
flowData,
|
||||
uploadedFilesContent,
|
||||
availableVariables,
|
||||
variableOverrides
|
||||
)
|
||||
nodeToExecuteData = reactFlowNodeData
|
||||
|
||||
Reference in New Issue
Block a user