mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-12-05 13:47:47 +08:00
22 lines
432 B
Go
22 lines
432 B
Go
package model
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
type ChatMessage struct {
|
|
BaseModel
|
|
ChatId string // 会话 ID
|
|
UserId uint // 用户 ID
|
|
RoleId uint // 角色 ID
|
|
Model string // AI模型
|
|
Type string
|
|
Icon string
|
|
Tokens int
|
|
Content string
|
|
UseContext bool // 是否可以作为聊天上下文
|
|
DeletedAt gorm.DeletedAt
|
|
}
|
|
|
|
func (ChatMessage) TableName() string {
|
|
return "chatgpt_chat_history"
|
|
}
|