mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Merge pull request #700 from FlowiseAI/bugfix/getRepository-undefined
Bufgix/GetRepository Undefined for Agent
This commit is contained in:
@@ -7,7 +7,8 @@ import {
|
|||||||
getStartingNodes,
|
getStartingNodes,
|
||||||
getUserHome,
|
getUserHome,
|
||||||
replaceInputsWithConfig,
|
replaceInputsWithConfig,
|
||||||
resolveVariables
|
resolveVariables,
|
||||||
|
databaseEntities
|
||||||
} from './utils'
|
} from './utils'
|
||||||
import { DataSource } from 'typeorm'
|
import { DataSource } from 'typeorm'
|
||||||
import { ChatFlow } from './entity/ChatFlow'
|
import { ChatFlow } from './entity/ChatFlow'
|
||||||
@@ -137,7 +138,11 @@ export class ChildProcess {
|
|||||||
const nodeInstance = new nodeModule.nodeClass()
|
const nodeInstance = new nodeModule.nodeClass()
|
||||||
|
|
||||||
logger.debug(`[server] [mode:child]: Running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
logger.debug(`[server] [mode:child]: Running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
||||||
const result = await nodeInstance.run(nodeToExecuteData, incomingInput.question, { chatHistory: incomingInput.history })
|
const result = await nodeInstance.run(nodeToExecuteData, incomingInput.question, {
|
||||||
|
chatHistory: incomingInput.history,
|
||||||
|
appDataSource: childAppDataSource,
|
||||||
|
databaseEntities
|
||||||
|
})
|
||||||
logger.debug(`[server] [mode:child]: Finished running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
logger.debug(`[server] [mode:child]: Finished running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
||||||
|
|
||||||
await sendToParentProcess('finish', { result, addToChatFlowPool })
|
await sendToParentProcess('finish', { result, addToChatFlowPool })
|
||||||
|
|||||||
@@ -993,10 +993,16 @@ export class App {
|
|||||||
chatHistory: incomingInput.history,
|
chatHistory: incomingInput.history,
|
||||||
socketIO,
|
socketIO,
|
||||||
socketIOClientId: incomingInput.socketIOClientId,
|
socketIOClientId: incomingInput.socketIOClientId,
|
||||||
logger
|
logger,
|
||||||
|
appDataSource: this.AppDataSource,
|
||||||
|
databaseEntities
|
||||||
|
})
|
||||||
|
: await nodeInstance.run(nodeToExecuteData, incomingInput.question, {
|
||||||
|
chatHistory: incomingInput.history,
|
||||||
|
logger,
|
||||||
|
appDataSource: this.AppDataSource,
|
||||||
|
databaseEntities
|
||||||
})
|
})
|
||||||
: await nodeInstance.run(nodeToExecuteData, incomingInput.question, { chatHistory: incomingInput.history, logger })
|
|
||||||
|
|
||||||
logger.debug(`[server]: Finished running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
logger.debug(`[server]: Finished running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
||||||
return res.json(result)
|
return res.json(result)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user