From 8ae4d075c4d043eae604af9cad0cf5e571420a61 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Wed, 20 Nov 2024 13:21:51 +0300 Subject: Feat: migration on startup --- bot.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bot.go') diff --git a/bot.go b/bot.go index 31354af..4587c08 100644 --- a/bot.go +++ b/bot.go @@ -276,10 +276,9 @@ func init() { if err := os.MkdirAll(historyDir, os.ModePerm); err != nil { panic(err) } - store = storage.NewProviderSQL("test.db") - // defer file.Close() logger = slog.New(slog.NewTextHandler(file, nil)) logger.Info("test msg") + store = storage.NewProviderSQL("test.db", logger) // https://github.com/coreydaley/ggerganov-llama.cpp/blob/master/examples/server/README.md // load all chats in memory loadHistoryChats() -- cgit v1.2.3