add vision analysis service with prompt versioning, response schema, and structured JSON output
This commit is contained in:
@@ -14,6 +14,15 @@ export function initializeAttachments(db) {
|
||||
position INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(message_id, attachment_id)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS attachment_references ON message_attachments(attachment_id);
|
||||
CREATE TABLE IF NOT EXISTS attachment_vision_analyses (
|
||||
attachment_id TEXT NOT NULL REFERENCES attachments(id) ON DELETE CASCADE,
|
||||
vision_model TEXT NOT NULL,
|
||||
prompt_version INTEGER NOT NULL,
|
||||
question TEXT NOT NULL,
|
||||
analysis TEXT NOT NULL,
|
||||
analyzed_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (attachment_id, vision_model, prompt_version, question)
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS upload_deletions (storage_key TEXT PRIMARY KEY);
|
||||
CREATE TRIGGER IF NOT EXISTS release_message_attachment AFTER DELETE ON message_attachments
|
||||
BEGIN
|
||||
|
||||
Reference in New Issue
Block a user