summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2024-11-21 18:15:01 +0300
committerGrail Finder <wohilas@gmail.com>2024-11-21 18:15:01 +0300
commitc35af037203ac5c39a4f704d5343bc2b5cc56a0c (patch)
tree0f392fc7788e3b2632ceeabe3b85af771c74fd2d /storage
parent35340d88863cb2a6a1b883bd3312abfef3a24c7a (diff)
Feat: add tools to tool map
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/storage.go b/storage/storage.go
index 67b8dd8..7d0d941 100644
--- a/storage/storage.go
+++ b/storage/storage.go
@@ -8,6 +8,11 @@ import (
"github.com/jmoiron/sqlx"
)
+type FullRepo interface {
+ ChatHistory
+ Memories
+}
+
type ChatHistory interface {
ListChats() ([]models.Chat, error)
GetChatByID(id uint32) (*models.Chat, error)
@@ -61,7 +66,7 @@ func (p ProviderSQL) RemoveChat(id uint32) error {
return err
}
-func NewProviderSQL(dbPath string, logger *slog.Logger) ChatHistory {
+func NewProviderSQL(dbPath string, logger *slog.Logger) FullRepo {
db, err := sqlx.Open("sqlite", dbPath)
if err != nil {
panic(err)