summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2024-11-20 13:21:51 +0300
committerGrail Finder <wohilas@gmail.com>2024-11-20 13:21:51 +0300
commit8ae4d075c4d043eae604af9cad0cf5e571420a61 (patch)
tree3b0eb7689a598e25dac67d889e037f3bc08c19a1 /bot.go
parent74669b58fe7b58b3d2fd4ad88c03890bc53a7a1a (diff)
Feat: migration on startup
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go3
1 files changed, 1 insertions, 2 deletions
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()