mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
@@ -133,6 +133,7 @@ interface IExecuteNodeParams {
|
||||
orgId: string
|
||||
workspaceId: string
|
||||
subscriptionId: string
|
||||
productId: string
|
||||
}
|
||||
|
||||
interface IExecuteAgentFlowParams extends Omit<IExecuteFlowParams, 'incomingInput'> {
|
||||
@@ -838,7 +839,8 @@ const executeNode = async ({
|
||||
iterationContext,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
}: IExecuteNodeParams): Promise<{
|
||||
result: any
|
||||
shouldStop?: boolean
|
||||
@@ -1060,7 +1062,8 @@ const executeNode = async ({
|
||||
},
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
})
|
||||
|
||||
// Store the result
|
||||
@@ -1287,7 +1290,8 @@ export const executeAgentFlow = async ({
|
||||
isTool = false,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
}: IExecuteAgentFlowParams) => {
|
||||
logger.debug('\n🚀 Starting flow execution')
|
||||
|
||||
@@ -1754,7 +1758,8 @@ export const executeAgentFlow = async ({
|
||||
iterationContext,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
})
|
||||
|
||||
if (executionResult.agentFlowExecutedData) {
|
||||
@@ -2020,7 +2025,9 @@ export const executeAgentFlow = async ({
|
||||
chatflowId: chatflowid,
|
||||
chatId,
|
||||
type: evaluationRunId ? ChatType.EVALUATION : isInternal ? ChatType.INTERNAL : ChatType.EXTERNAL,
|
||||
flowGraph: getTelemetryFlowObj(nodes, edges)
|
||||
flowGraph: getTelemetryFlowObj(nodes, edges),
|
||||
productId,
|
||||
subscriptionId
|
||||
},
|
||||
orgId
|
||||
)
|
||||
|
||||
@@ -249,7 +249,8 @@ export const executeFlow = async ({
|
||||
isTool,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
}: IExecuteFlowParams) => {
|
||||
// Ensure incomingInput has all required properties with default values
|
||||
incomingInput = {
|
||||
@@ -421,7 +422,8 @@ export const executeFlow = async ({
|
||||
isTool,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
})
|
||||
}
|
||||
|
||||
@@ -812,7 +814,9 @@ export const executeFlow = async ({
|
||||
chatflowId: chatflowid,
|
||||
chatId,
|
||||
type: isEvaluation ? ChatType.EVALUATION : isInternal ? ChatType.INTERNAL : ChatType.EXTERNAL,
|
||||
flowGraph: getTelemetryFlowObj(nodes, edges)
|
||||
flowGraph: getTelemetryFlowObj(nodes, edges),
|
||||
productId,
|
||||
subscriptionId
|
||||
},
|
||||
orgId
|
||||
)
|
||||
@@ -954,6 +958,9 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
||||
organizationId = orgId
|
||||
const subscriptionId = org.subscriptionId as string
|
||||
|
||||
const subscriptionDetails = await appServer.usageCacheManager.getSubscriptionDataFromCache(subscriptionId)
|
||||
const productId = subscriptionDetails?.productId || ''
|
||||
|
||||
await checkPredictions(orgId, subscriptionId, appServer.usageCacheManager)
|
||||
|
||||
const executeData: IExecuteFlowParams = {
|
||||
@@ -974,7 +981,8 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
||||
usageCacheManager: appServer.usageCacheManager,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
}
|
||||
|
||||
if (process.env.MODE === MODE.QUEUE) {
|
||||
|
||||
@@ -277,6 +277,9 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
|
||||
const orgId = org.id
|
||||
const subscriptionId = org.subscriptionId as string
|
||||
|
||||
const subscriptionDetails = await appServer.usageCacheManager.getSubscriptionDataFromCache(subscriptionId)
|
||||
const productId = subscriptionDetails?.productId || ''
|
||||
|
||||
const executeData: IExecuteFlowParams = {
|
||||
componentNodes: appServer.nodesPool.componentNodes,
|
||||
incomingInput,
|
||||
@@ -293,7 +296,8 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
|
||||
isUpsert: true,
|
||||
orgId,
|
||||
workspaceId,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
productId
|
||||
}
|
||||
|
||||
if (process.env.MODE === MODE.QUEUE) {
|
||||
|
||||
Reference in New Issue
Block a user