diff options
author | Grail Finder <wohilas@gmail.com> | 2024-12-02 19:58:03 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2024-12-02 19:58:03 +0300 |
commit | a5ab816c9434022159548ac0d1872160b3c8908d (patch) | |
tree | a4e68c334f2a514f02afd65a1bb70eff415fb8cd /models/db.go | |
parent | 8d3997baff25f28c23441699be7692f853cf1f0f (diff) |
Feat: add character card support
Diffstat (limited to 'models/db.go')
-rw-r--r-- | models/db.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/db.go b/models/db.go index 5f49003..4f52f68 100644 --- a/models/db.go +++ b/models/db.go @@ -8,13 +8,13 @@ import ( type Chat struct { ID uint32 `db:"id" json:"id"` Name string `db:"name" json:"name"` - Msgs string `db:"msgs" json:"msgs"` // []MessagesStory to string json + Msgs string `db:"msgs" json:"msgs"` // []RoleMsg to string json CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` } -func (c Chat) ToHistory() ([]MessagesStory, error) { - resp := []MessagesStory{} +func (c Chat) ToHistory() ([]RoleMsg, error) { + resp := []RoleMsg{} if err := json.Unmarshal([]byte(c.Msgs), &resp); err != nil { return nil, err } |