feat: 更新数据库和后端服务
- 新增chat_sessions和chat_groups数据库表 - 更新skill_handler和model相关接口 - 修改main.go注册新路由 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ type ModelInfo struct {
|
||||
APIKey string `json:"api_key" gorm:"type:text"` // API 密钥
|
||||
BaseURL string `json:"base_url" gorm:"type:varchar(500)"` // 基础 URL
|
||||
APIEndpoint string `json:"api_endpoint" gorm:"type:varchar(500)"` // API 端点路径
|
||||
Status string `json:"status" gorm:"type:varchar(20);default:active"` // active/inactive
|
||||
Status int `json:"status" gorm:"type:tinyint;default:0"` // 1:active, 0:inactive
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
@@ -39,7 +39,7 @@ type CreateModelRequest struct {
|
||||
APIKey string `json:"api_key" binding:"required"`
|
||||
BaseURL string `json:"base_url" binding:"required"`
|
||||
APIEndpoint string `json:"api_endpoint"`
|
||||
Status string `json:"status"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
// UpdateModelRequest 更新模型请求
|
||||
@@ -51,7 +51,7 @@ type UpdateModelRequest struct {
|
||||
APIKey string `json:"api_key"`
|
||||
BaseURL string `json:"base_url"`
|
||||
APIEndpoint string `json:"api_endpoint"`
|
||||
Status string `json:"status"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
// TestModelRequest 测试模型连接请求
|
||||
|
||||
Reference in New Issue
Block a user