feat: 支持文心4.0模型,不同的用户可以订阅不同的AI模型

This commit is contained in:
RockYang
2023-10-26 13:41:49 +08:00
parent 5b5150e6d4
commit 01205af018
30 changed files with 193 additions and 47 deletions

View File

@@ -7,4 +7,5 @@ type ChatModel struct {
Value string // API Key 的值
SortNum int
Enabled bool
Weight int // 对话权重,每次对话扣减多少次对话额度
}

View File

@@ -11,6 +11,7 @@ type User struct {
ImgCalls int // 剩余绘图次数
ChatConfig string `gorm:"column:chat_config_json"` // 聊天配置 json
ChatRoles string `gorm:"column:chat_roles_json"` // 聊天角色
ChatModels string `gorm:"column:chat_models_json"` // AI 模型,不同的用户拥有不同的聊天模型
ExpiredTime int64 // 账户到期时间
Status bool `gorm:"default:true"` // 当前状态
LastLoginAt int64 // 最后登录时间