Something went wrong. Try again.
the coolest token pot ever
Something went wrong. Try again.
123456789101112131415161718-- name: UpsertMessage :oneINSERT INTO messages (id, conversation_id, client_id, role, content, model, created_at)VALUES (?, ?, ?, ?, ?, ?, ?)ON CONFLICT(conversation_id, client_id) DO UPDATE SET content = excluded.contentRETURNING *;
-- name: GetMessage :oneSELECT * FROM messages WHERE id = ?;
-- name: ListMessagesForConversation :manySELECT * FROM messagesWHERE conversation_id = ?ORDER BY created_at ASC, id ASC;
-- name: AppendAssistantContent :execUPDATE messages SET content = content || ? WHERE id = ?;