mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-07 22:24:06 -05:00
feat(agent): messages array, memory (#2023)
* feat(agent): messages array, memory options * feat(messages-input): re-order messages * backend for new memory setup, backwards compatibility in loadWorkflowsFromNormalizedTable from old agent block to new format * added memories all conversation sliding token window, standardized modals * lint * fix build * reorder popover for output selector for chat * add internal auth, finish memories * fix rebase * fix failing test --------- Co-authored-by: waleed <walif6@gmail.com>
This commit is contained in:
2
packages/db/migrations/0109_bumpy_earthquake.sql
Normal file
2
packages/db/migrations/0109_bumpy_earthquake.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "memory" ALTER COLUMN "data" SET DATA TYPE jsonb;--> statement-breakpoint
|
||||
ALTER TABLE "memory" DROP COLUMN "type";
|
||||
7672
packages/db/migrations/meta/0109_snapshot.json
Normal file
7672
packages/db/migrations/meta/0109_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -757,6 +757,13 @@
|
||||
"when": 1762572820066,
|
||||
"tag": "0108_cuddly_scream",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 109,
|
||||
"version": "7",
|
||||
"when": 1763503885555,
|
||||
"tag": "0109_bumpy_earthquake",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -916,9 +916,8 @@ export const memory = pgTable(
|
||||
{
|
||||
id: text('id').primaryKey(),
|
||||
workflowId: text('workflow_id').references(() => workflow.id, { onDelete: 'cascade' }),
|
||||
key: text('key').notNull(), // Identifier for the memory within its context
|
||||
type: text('type').notNull(), // 'agent' or 'raw'
|
||||
data: json('data').notNull(), // Stores either agent message data or raw data
|
||||
key: text('key').notNull(), // Conversation ID provided by user with format: conversationId:blockId
|
||||
data: jsonb('data').notNull(), // Stores agent messages as array of {role, content} objects
|
||||
createdAt: timestamp('created_at').notNull().defaultNow(),
|
||||
updatedAt: timestamp('updated_at').notNull().defaultNow(),
|
||||
deletedAt: timestamp('deleted_at'),
|
||||
|
||||
Reference in New Issue
Block a user