🎨 优化模型配置 && 新增apikey功能 && 完善通用接口

This commit is contained in:
2026-03-03 17:13:24 +08:00
parent 2714e63d2a
commit 7dae1a6e2b
46 changed files with 3063 additions and 278 deletions

View File

@@ -13,6 +13,7 @@ type AiProvider struct {
APIKey string `json:"api_key" gorm:"type:varchar(255);not null;comment:API密钥"`
Model string `json:"model" gorm:"type:varchar(100);comment:默认模型"`
Enabled bool `json:"enabled" gorm:"default:true;comment:是否启用"`
IsDefault bool `json:"is_default" gorm:"default:false;comment:是否为默认提供商"`
Priority int `json:"priority" gorm:"default:0;comment:优先级"`
MaxRetries int `json:"max_retries" gorm:"default:3;comment:最大重试次数"`
Timeout int `json:"timeout" gorm:"default:60;comment:超时时间(秒)"`