feat: add model field for chat_item and and chat_history data table

This commit is contained in:
RockYang
2024-01-26 16:54:00 +08:00
parent b76cd1d5ae
commit f66d59531d
11 changed files with 33 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ type HistoryMessage struct {
ChatId string // 会话 ID
UserId uint // 用户 ID
RoleId uint // 角色 ID
Model string // AI模型
Type string
Icon string
Tokens int

View File

@@ -7,7 +7,8 @@ type ChatItem struct {
ChatId string `gorm:"column:chat_id;unique"` // 会话 ID
UserId uint // 用户 ID
RoleId uint // 角色 ID
ModelId uint // 会话模型
ModelId uint // 模型 ID
Model string // 模型
Title string // 会话标题
DeletedAt gorm.DeletedAt
}

View File

@@ -5,6 +5,7 @@ type HistoryMessage struct {
ChatId string `json:"chat_id"`
UserId uint `json:"user_id"`
RoleId uint `json:"role_id"`
Model string `json:"model"`
Type string `json:"type"`
Icon string `json:"icon"`
Tokens int `json:"tokens"`

View File

@@ -7,5 +7,6 @@ type ChatItem struct {
RoleId uint `json:"role_id"`
ChatId string `json:"chat_id"`
ModelId uint `json:"model_id"`
Model string `json:"model"`
Title string `json:"title"`
}