Commit 3370b3d 1 parent 1be62b4 commit 3370b3d Copy full SHA for 3370b3d
File tree 1 file changed +6
-4
lines changed
packages/components/nodes/sequentialagents/State
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,15 @@ class State_SeqAgents implements INode {
107
107
108
108
if ( stateMemory && stateMemory !== 'stateMemoryUI' && stateMemory !== 'stateMemoryCode' ) {
109
109
try {
110
+ const parsedSchemaFromUI = typeof stateMemoryUI === 'string' ? JSON . parse ( stateMemoryUI ) : stateMemoryUI
110
111
const parsedSchema = typeof stateMemory === 'string' ? JSON . parse ( stateMemory ) : stateMemory
112
+ const combinedMemorySchema = [ ...parsedSchemaFromUI , ...parsedSchema ]
111
113
const obj : ICommonObject = { }
112
- for ( const sch of parsedSchema ) {
113
- const key = sch . Key
114
+ for ( const sch of combinedMemorySchema ) {
115
+ const key = sch . Key ?? sch . key
114
116
if ( ! key ) throw new Error ( `Key is required` )
115
- const type = sch . Operation
116
- const defaultValue = sch [ 'Default Value' ]
117
+ const type = sch . Operation ?? sch . type
118
+ const defaultValue = sch [ 'Default Value' ] ?? sch . defaultValue
117
119
118
120
if ( type === 'Append' ) {
119
121
obj [ key ] = {
You can’t perform that action at this time.
0 commit comments