add memory option

This commit is contained in:
Henry
2023-07-09 16:11:42 +01:00
parent 21552776d6
commit fb28f61f8b
3 changed files with 49 additions and 11 deletions
+4 -2
View File
@@ -168,8 +168,10 @@ export const isValidConnection = (connection, reactFlowInstance) => {
//sourceHandle: "llmChain_0-output-llmChain-BaseChain"
//targetHandle: "mrlkAgentLLM_0-input-model-BaseLanguageModel"
const sourceTypes = sourceHandle.split('-')[sourceHandle.split('-').length - 1].split('|')
const targetTypes = targetHandle.split('-')[targetHandle.split('-').length - 1].split('|')
let sourceTypes = sourceHandle.split('-')[sourceHandle.split('-').length - 1].split('|')
sourceTypes = sourceTypes.map((s) => s.trim())
let targetTypes = targetHandle.split('-')[targetHandle.split('-').length - 1].split('|')
targetTypes = targetTypes.map((t) => t.trim())
if (targetTypes.some((t) => sourceTypes.includes(t))) {
let targetNode = reactFlowInstance.getNode(target)