mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 18:23:45 +08:00
重构主体工作完成
This commit is contained in:
@@ -9,6 +9,6 @@ type ApiKey struct {
|
||||
Value string // API Key 的值
|
||||
ApiURL string // 当前 KEY 的 API 地址
|
||||
Enabled bool // 是否启用
|
||||
UseProxy bool // 是否使用代理访问 API URL
|
||||
ProxyURL string // 代理地址
|
||||
LastUsedAt int64 // 最后使用时间
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ package model
|
||||
|
||||
type ChatModel struct {
|
||||
BaseModel
|
||||
Platform string
|
||||
Name string
|
||||
Value string // API Key 的值
|
||||
SortNum int
|
||||
Enabled bool
|
||||
Power int // 每次对话消耗算力
|
||||
Open bool // 是否开放模型给所有人使用
|
||||
Platform string
|
||||
Name string
|
||||
Value string // API Key 的值
|
||||
SortNum int
|
||||
Enabled bool
|
||||
Power int // 每次对话消耗算力
|
||||
Open bool // 是否开放模型给所有人使用
|
||||
MaxTokens int // 最大响应长度
|
||||
MaxContext int // 最大上下文长度
|
||||
Temperature float32 // 模型温度
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ type ApiKey struct {
|
||||
Value string `json:"value"` // API Key 的值
|
||||
ApiURL string `json:"api_url"`
|
||||
Enabled bool `json:"enabled"`
|
||||
UseProxy bool `json:"use_proxy"`
|
||||
ProxyURL string `json:"proxy_url"`
|
||||
LastUsedAt int64 `json:"last_used_at"` // 最后使用时间
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ package vo
|
||||
|
||||
type ChatModel struct {
|
||||
BaseVo
|
||||
Platform string `json:"platform"`
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
Enabled bool `json:"enabled"`
|
||||
SortNum int `json:"sort_num"`
|
||||
Weight int `json:"weight"`
|
||||
Open bool `json:"open"`
|
||||
Platform string `json:"platform"`
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
Enabled bool `json:"enabled"`
|
||||
SortNum int `json:"sort_num"`
|
||||
Power int `json:"power"`
|
||||
Open bool `json:"open"`
|
||||
MaxTokens int `json:"max_tokens"` // 最大响应长度
|
||||
MaxContext int `json:"max_context"` // 最大上下文长度
|
||||
Temperature float32 `json:"temperature"` // 模型温度
|
||||
}
|
||||
|
||||
@@ -5,6 +5,5 @@ import "chatplus/core/types"
|
||||
type Config struct {
|
||||
Id uint `json:"id"`
|
||||
Key string `json:"key"`
|
||||
ChatConfig types.ChatConfig `json:"chat_config"`
|
||||
SystemConfig types.SystemConfig `json:"system_config"`
|
||||
}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package vo
|
||||
|
||||
import "chatplus/core/types"
|
||||
|
||||
type User struct {
|
||||
BaseVo
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Salt string `json:"salt"` // 密码盐
|
||||
Power int `json:"power"` // 剩余算力
|
||||
ChatConfig types.UserChatConfig `json:"chat_config"` // 聊天配置
|
||||
ChatRoles []string `json:"chat_roles"` // 聊天角色集合
|
||||
ChatModels []string `json:"chat_models"` // AI模型集合
|
||||
ExpiredTime int64 `json:"expired_time"` // 账户到期时间
|
||||
Status bool `json:"status"` // 当前状态
|
||||
LastLoginAt int64 `json:"last_login_at"` // 最后登录时间
|
||||
LastLoginIp string `json:"last_login_ip"` // 最后登录 IP
|
||||
Vip bool `json:"vip"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Salt string `json:"salt"` // 密码盐
|
||||
Power int `json:"power"` // 剩余算力
|
||||
ChatRoles []string `json:"chat_roles"` // 聊天角色集合
|
||||
ChatModels []string `json:"chat_models"` // AI模型集合
|
||||
ExpiredTime int64 `json:"expired_time"` // 账户到期时间
|
||||
Status bool `json:"status"` // 当前状态
|
||||
LastLoginAt int64 `json:"last_login_at"` // 最后登录时间
|
||||
LastLoginIp string `json:"last_login_ip"` // 最后登录 IP
|
||||
Vip bool `json:"vip"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user