Feat: add memory [wip]

This commit is contained in:
Grail Finder
2024-11-20 20:47:49 +03:00
parent fc517c2c69
commit 5ccad20bd6
8 changed files with 167 additions and 19 deletions

View File

@@ -1,7 +1,16 @@
CREATE TABLE IF NOT EXISTS chat (
CREATE TABLE IF NOT EXISTS chats (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
msgs TEXT NOT NULL, -- Store messages as a comma-separated string
msgs TEXT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS memories (
agent TEXT NOT NULL,
topic TEXT NOT NULL,
mind TEXT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (agent, topic)
);