35 lines
8.9 KiB
Go
35 lines
8.9 KiB
Go
// =================================================================================
|
||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||
// =================================================================================
|
||
|
||
package entity
|
||
|
||
import (
|
||
"github.com/gogf/gf/v2/os/gtime"
|
||
)
|
||
|
||
// ChnChannels is the golang structure for table chn_channels.
|
||
type ChnChannels struct {
|
||
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
|
||
Name string `json:"name" orm:"name" description:"渠道显示名称(如 \"OpenAI 主力\"、\"Claude 备用\")"` // 渠道显示名称(如 "OpenAI 主力"、"Claude 备用")
|
||
Type int `json:"type" orm:"type" description:"供应商类型:1=OpenAI, 2=Anthropic Claude, 3=Google Gemini, 4=阿里云百炼, 5=百度文心, 6=腾讯混元, 7=智谱AI, 8=DeepSeek, 9=Moonshot, 10=火山引擎, 11=AWS Bedrock, 12=Azure OpenAI, 13=Google Vertex AI, 14=Cohere, 15=Mistral, 16=xAI"` // 供应商类型:1=OpenAI, 2=Anthropic Claude, 3=Google Gemini, 4=阿里云百炼, 5=百度文心, 6=腾讯混元, 7=智谱AI, 8=DeepSeek, 9=Moonshot, 10=火山引擎, 11=AWS Bedrock, 12=Azure OpenAI, 13=Google Vertex AI, 14=Cohere, 15=Mistral, 16=xAI
|
||
BaseUrl string `json:"base_url" orm:"base_url" description:"API 基础地址"` // API 基础地址
|
||
Status string `json:"status" orm:"status" description:"状态:active(启用)/ disabled(禁用)/ testing(测试中)"` // 状态:active(启用)/ disabled(禁用)/ testing(测试中)
|
||
Priority int `json:"priority" orm:"priority" description:"优先级(数字越大越优先,调度时优先选择高优先级渠道)"` // 优先级(数字越大越优先,调度时优先选择高优先级渠道)
|
||
Weight int `json:"weight" orm:"weight" description:"权重(同优先级下按权重随机选择,范围 1-100)"` // 权重(同优先级下按权重随机选择,范围 1-100)
|
||
MaxConcurrency int `json:"max_concurrency" orm:"max_concurrency" description:"最大并发请求数"` // 最大并发请求数
|
||
Settings string `json:"settings" orm:"settings" description:"渠道配置(JSONB):超时时间、重试次数等"` // 渠道配置(JSONB):超时时间、重试次数等
|
||
TestModel string `json:"test_model" orm:"test_model" description:"测试使用的模型名"` // 测试使用的模型名
|
||
Remark string `json:"remark" orm:"remark" description:"备注"` // 备注
|
||
CreatedBy int64 `json:"created_by" orm:"created_by" description:"创建者管理员ID"` // 创建者管理员ID
|
||
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
|
||
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
|
||
IsVip bool `json:"is_vip" orm:"is_vip" description:"是否VIP专属渠道"` // 是否VIP专属渠道
|
||
SharingThreshold float64 `json:"sharing_threshold" orm:"sharing_threshold" description:"允许普通租户借用的利用率阈值(如0.6表示利用率<60%时可借用)"` // 允许普通租户借用的利用率阈值(如0.6表示利用率<60%时可借用)
|
||
PreemptionThreshold float64 `json:"preemption_threshold" orm:"preemption_threshold" description:"触发VIP抢占的利用率阈值(如0.8表示利用率>=80%时VIP可抢占)"` // 触发VIP抢占的利用率阈值(如0.8表示利用率>=80%时VIP可抢占)
|
||
BorrowingCooldownSeconds int `json:"borrowing_cooldown_seconds" orm:"borrowing_cooldown_seconds" description:"普通租户被抢占后的冷却时间(秒)"` // 普通租户被抢占后的冷却时间(秒)
|
||
AutoDisabled int `json:"auto_disabled" orm:"auto_disabled" description:"是否被自动禁用:0=否, 1=是(由连续失败触发)"` // 是否被自动禁用:0=否, 1=是(由连续失败触发)
|
||
Tier string `json:"tier" orm:"tier" description:"调度层级:primary=首选 secondary=备用 reserve=保底"` // 调度层级:primary=首选 secondary=备用 reserve=保底
|
||
StrictCapacity bool `json:"strict_capacity" orm:"strict_capacity" description:"严格容量:true 时 Redis 故障期间使用实例级保守并发限额(fail-closed),用于高成本/严格配额渠道;false 为 fail-open"` // 严格容量:true 时 Redis 故障期间使用实例级保守并发限额(fail-closed),用于高成本/严格配额渠道;false 为 fail-open
|
||
}
|