53 lines
1.7 KiB
Go
53 lines
1.7 KiB
Go
package entity
|
|
|
|
import "gitea.com/red-future/common/beans"
|
|
|
|
type asynchModelCol struct {
|
|
beans.SQLBaseCol
|
|
ModelName string
|
|
BaseURL string
|
|
Route string
|
|
HttpMethod string
|
|
APIKey string
|
|
Enabled string
|
|
MaxConcurrency string
|
|
QueueLimit string
|
|
TimeoutMs string
|
|
RetryTimes string
|
|
AutoCleanSeconds string
|
|
Remark string
|
|
}
|
|
|
|
var AsynchModelCol = asynchModelCol{
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
ModelName: "model_name",
|
|
BaseURL: "base_url",
|
|
Route: "route",
|
|
HttpMethod: "http_method",
|
|
APIKey: "api_key",
|
|
Enabled: "enabled",
|
|
MaxConcurrency: "max_concurrency",
|
|
QueueLimit: "queue_limit",
|
|
TimeoutMs: "timeout_ms",
|
|
RetryTimes: "retry_times",
|
|
AutoCleanSeconds: "auto_clean_seconds",
|
|
Remark: "remark",
|
|
}
|
|
|
|
// AsynchModel 异步模型配置
|
|
type AsynchModel struct {
|
|
beans.SQLBaseDO `orm:",inline"`
|
|
ModelName string `orm:"model_name" json:"modelName"`
|
|
BaseURL string `orm:"base_url" json:"baseUrl"`
|
|
Route string `orm:"route" json:"route"`
|
|
HttpMethod string `orm:"http_method" json:"httpMethod"`
|
|
APIKey string `orm:"api_key" json:"apiKey"`
|
|
Enabled int `orm:"enabled" json:"enabled"`
|
|
MaxConcurrency int `orm:"max_concurrency" json:"maxConcurrency"`
|
|
QueueLimit int `orm:"queue_limit" json:"queueLimit"`
|
|
TimeoutMs int `orm:"timeout_ms" json:"timeoutMs"`
|
|
RetryTimes int `orm:"retry_times" json:"retryTimes"`
|
|
AutoCleanSeconds int `orm:"auto_clean_seconds" json:"autoCleanSeconds"`
|
|
Remark string `orm:"remark" json:"remark"`
|
|
}
|