2026-04-29 15:54:14 +08:00
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
import "gitea.com/red-future/common/beans"
|
|
|
|
|
|
|
|
|
|
type asynchModelCol struct {
|
|
|
|
|
beans.SQLBaseCol
|
2026-05-21 10:41:37 +08:00
|
|
|
ModelName string
|
|
|
|
|
ModelType string
|
|
|
|
|
BaseURL string
|
|
|
|
|
HttpMethod string
|
|
|
|
|
HeadMsg string
|
|
|
|
|
FormJSON string
|
|
|
|
|
RequestMapping string
|
|
|
|
|
ResponseMapping string
|
|
|
|
|
ResponseBody string
|
|
|
|
|
ResponseTokenField string
|
|
|
|
|
IsPrivate string
|
|
|
|
|
IsChatModel string
|
2026-06-02 20:26:45 +08:00
|
|
|
IsAsync string
|
|
|
|
|
IsStream string
|
2026-05-21 10:41:37 +08:00
|
|
|
ApiKey string
|
|
|
|
|
Enabled string
|
|
|
|
|
MaxConcurrency string
|
|
|
|
|
TimeoutSeconds string
|
|
|
|
|
RetryTimes string
|
|
|
|
|
AutoCleanSeconds string
|
|
|
|
|
IsOwner string
|
|
|
|
|
OperatorName string
|
|
|
|
|
TokenConfig string
|
2026-05-23 18:08:08 +08:00
|
|
|
ExtendMapping string
|
|
|
|
|
QueryConfig string
|
2026-05-30 22:08:46 +08:00
|
|
|
StreamConfig string
|
2026-06-02 20:26:45 +08:00
|
|
|
FirstFrame string
|
|
|
|
|
LastFrame string
|
|
|
|
|
CallbackUrl string
|
2026-04-29 15:54:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var AsynchModelCol = asynchModelCol{
|
2026-05-21 10:41:37 +08:00
|
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
|
|
|
ModelName: "model_name",
|
|
|
|
|
ModelType: "model_type",
|
|
|
|
|
BaseURL: "base_url",
|
|
|
|
|
HttpMethod: "http_method",
|
|
|
|
|
HeadMsg: "head_msg",
|
|
|
|
|
FormJSON: "form_json",
|
|
|
|
|
RequestMapping: "request_mapping",
|
|
|
|
|
ResponseMapping: "response_mapping",
|
|
|
|
|
ResponseBody: "response_body",
|
|
|
|
|
ResponseTokenField: "response_token_field",
|
|
|
|
|
IsPrivate: "is_private",
|
|
|
|
|
IsChatModel: "is_chat_model",
|
2026-06-02 20:26:45 +08:00
|
|
|
IsAsync: "is_async",
|
|
|
|
|
IsStream: "is_stream",
|
2026-05-21 10:41:37 +08:00
|
|
|
ApiKey: "api_key",
|
|
|
|
|
Enabled: "enabled",
|
|
|
|
|
MaxConcurrency: "max_concurrency",
|
|
|
|
|
TimeoutSeconds: "timeout_seconds",
|
|
|
|
|
RetryTimes: "retry_times",
|
|
|
|
|
AutoCleanSeconds: "auto_clean_seconds",
|
|
|
|
|
IsOwner: "is_owner",
|
|
|
|
|
OperatorName: "operator_name",
|
|
|
|
|
TokenConfig: "token_config",
|
2026-05-23 18:08:08 +08:00
|
|
|
ExtendMapping: "extend_mapping",
|
|
|
|
|
QueryConfig: "query_config",
|
2026-05-30 22:08:46 +08:00
|
|
|
StreamConfig: "stream_config",
|
2026-06-02 20:26:45 +08:00
|
|
|
FirstFrame: "first_frame",
|
|
|
|
|
LastFrame: "last_frame",
|
|
|
|
|
CallbackUrl: "callback_url",
|
2026-04-29 15:54:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AsynchModel 异步模型配置
|
|
|
|
|
type AsynchModel struct {
|
2026-06-02 20:26:45 +08:00
|
|
|
beans.SQLBaseDO `orm:",inline"`
|
|
|
|
|
ModelName string `orm:"model_name" json:"modelName"`
|
|
|
|
|
ModelType int `orm:"model_type" json:"modelType"`
|
|
|
|
|
BaseURL string `orm:"base_url" json:"baseUrl"`
|
|
|
|
|
HttpMethod string `orm:"http_method" json:"httpMethod"`
|
|
|
|
|
HeadMsg map[string]any `orm:"head_msg" json:"headMsg"`
|
|
|
|
|
Form []map[string]any `orm:"form_json" json:"form"`
|
|
|
|
|
RequestMapping map[string]any `orm:"request_mapping" json:"requestMapping"`
|
|
|
|
|
ResponseMapping map[string]any `orm:"response_mapping" json:"responseMapping"`
|
|
|
|
|
ResponseBody string `orm:"response_body" json:"responseBody"`
|
|
|
|
|
ResponseTokenField string `orm:"response_token_field" json:"responseTokenField"`
|
|
|
|
|
IsPrivate *int `orm:"is_private" json:"isPrivate"`
|
|
|
|
|
IsChatModel *int `orm:"is_chat_model" json:"isChatModel"`
|
|
|
|
|
IsAsync *int `orm:"is_async" json:"isAsync"`
|
|
|
|
|
IsStream *int `orm:"is_stream" json:"isStream"`
|
|
|
|
|
ApiKey string `orm:"api_key" json:"apiKey"`
|
|
|
|
|
Enabled *int `orm:"enabled" json:"enabled"`
|
|
|
|
|
MaxConcurrency int `orm:"max_concurrency" json:"maxConcurrency"`
|
|
|
|
|
TimeoutSeconds int `orm:"timeout_seconds" json:"timeoutSeconds"`
|
|
|
|
|
RetryTimes int `orm:"retry_times" json:"retryTimes"`
|
|
|
|
|
AutoCleanSeconds int `orm:"auto_clean_seconds" json:"autoCleanSeconds"`
|
|
|
|
|
IsOwner *int `json:"isOwner" orm:"is_owner"`
|
|
|
|
|
OperatorName string `orm:"operator_name" json:"operatorName"`
|
|
|
|
|
TokenConfig map[string]any `orm:"token_config" json:"tokenConfig"`
|
|
|
|
|
ExtendMapping map[string]any `orm:"extend_mapping" json:"extendMapping"`
|
|
|
|
|
QueryConfig map[string]any `orm:"query_config" json:"queryConfig"`
|
|
|
|
|
StreamConfig map[string]any `orm:"stream_config" json:"streamConfig"`
|
|
|
|
|
FirstFrame string `orm:"first_frame" json:"firstFrame"`
|
|
|
|
|
LastFrame string `orm:"last_frame" json:"lastFrame"`
|
|
|
|
|
CallbackUrl string `orm:"callback_url" json:"callbackUrl"`
|
2026-04-29 15:54:14 +08:00
|
|
|
}
|