summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/storage.go b/storage/storage.go
index 9a1595c..b876dbc 100644
--- a/storage/storage.go
+++ b/storage/storage.go
@@ -56,8 +56,8 @@ func (p ProviderSQL) GetLastChatByAgent(agent string) (*models.Chat, error) {
func (p ProviderSQL) UpsertChat(chat *models.Chat) (*models.Chat, error) {
// Prepare the SQL statement
query := `
- INSERT OR REPLACE INTO chats (id, name, msgs, created_at, updated_at)
- VALUES (:id, :name, :msgs, :created_at, :updated_at)
+ INSERT OR REPLACE INTO chats (id, name, msgs, agent, created_at, updated_at)
+ VALUES (:id, :name, :msgs, :agent, :created_at, :updated_at)
RETURNING *;`
stmt, err := p.db.PrepareNamed(query)
if err != nil {