- add refine chain type custom system message

- allow all memory type to conver_re_qa_chain
- fix startsWith undefined where override config file is not passed
- ability to generate new session id when sharing chatbot
This commit is contained in:
Henry
2023-07-24 19:11:39 +01:00
parent e237a5f18c
commit bcf3946efb
10 changed files with 373 additions and 240 deletions
+11 -1
View File
@@ -1,6 +1,14 @@
import path from 'path'
import { IChildProcessMessage, IReactFlowNode, IReactFlowObject, IRunChatflowMessageValue, INodeData } from './Interface'
import { buildLangchain, constructGraphs, getEndingNode, getStartingNodes, getUserHome, resolveVariables } from './utils'
import {
buildLangchain,
constructGraphs,
getEndingNode,
getStartingNodes,
getUserHome,
replaceInputsWithConfig,
resolveVariables
} from './utils'
import { DataSource } from 'typeorm'
import { ChatFlow } from './entity/ChatFlow'
import { ChatMessage } from './entity/ChatMessage'
@@ -109,6 +117,8 @@ export class ChildProcess {
return
}
if (incomingInput.overrideConfig)
nodeToExecute.data = replaceInputsWithConfig(nodeToExecute.data, incomingInput.overrideConfig)
const reactFlowNodeData: INodeData = resolveVariables(nodeToExecute.data, reactFlowNodes, incomingInput.question)
nodeToExecuteData = reactFlowNodeData