do

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogAudio

type LogAudio struct {
	gmeta.Meta           `collection:"log_audio" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	Input                string                 `bson:"input,omitempty"`                   // 输入文本
	Text                 string                 `bson:"text,omitempty"`                    // 输出文本
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogBatch

type LogBatch struct {
	gmeta.Meta           `collection:"log_batch" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	Action               string                 `bson:"action,omitempty"`                  // 接口
	BatchId              string                 `bson:"batch_id,omitempty"`                // 批处理ID
	RequestData          map[string]any         `bson:"request_data,omitempty"`            // 请求数据
	ResponseData         map[string]any         `bson:"response_data,omitempty"`           // 响应数据
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogFile

type LogFile struct {
	gmeta.Meta           `collection:"log_file" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	Action               string                 `bson:"action,omitempty"`                  // 接口
	FileId               string                 `bson:"file_id,omitempty"`                 // 文件ID
	RequestData          map[string]any         `bson:"request_data,omitempty"`            // 请求数据
	ResponseData         map[string]any         `bson:"response_data,omitempty"`           // 响应数据
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogGeneral

type LogGeneral struct {
	gmeta.Meta           `collection:"log_general" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	RequestData          map[string]any         `bson:"request_data,omitempty"`            // 请求数据
	ResponseData         map[string]any         `bson:"response_data,omitempty"`           // 响应数据
	Stream               bool                   `bson:"stream,omitempty"`                  // 流式
	Completion           string                 `bson:"completion,omitempty"`              // 补全(回答)
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	ConnTime             int64                  `bson:"conn_time,omitempty"`               // 连接时间
	Duration             int64                  `bson:"duration,omitempty"`                // 持续时间
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogImage

type LogImage struct {
	gmeta.Meta           `collection:"log_image" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	Prompt               string                 `bson:"prompt,omitempty"`                  // 提示(提问)
	Size                 string                 `bson:"size,omitempty"`                    // 尺寸大小
	N                    int                    `bson:"n,omitempty"`                       // 图像数
	Quality              string                 `bson:"quality,omitempty"`                 // 图像质量[high, medium, low, hd, standard]
	Style                string                 `bson:"style,omitempty"`                   // 图像样式[vivid, natural]
	ResponseFormat       string                 `bson:"response_format,omitempty"`         // 图像格式[url, b64_json]
	ImageData            []common.ImageData     `bson:"image_data,omitempty"`              // 生成图像数据
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogMidjourney

type LogMidjourney struct {
	gmeta.Meta           `collection:"log_midjourney" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	ReqUrl               string                 `bson:"req_url,omitempty"`                 // 请求地址
	TaskId               string                 `bson:"task_id,omitempty"`                 // 任务ID
	Action               string                 `bson:"action,omitempty"`                  // 动作[IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN, SWAP_FACE]
	Prompt               string                 `bson:"prompt,omitempty"`                  // 提示(提问)
	PromptEn             string                 `bson:"prompt_en,omitempty"`               // 英文提示(提问)
	ImageUrl             string                 `bson:"image_url,omitempty"`               // 图像地址
	Progress             string                 `bson:"progress,omitempty"`                // 进度
	Response             any                    `bson:"response,omitempty"`                // 响应结果
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	ConnTime             int64                  `bson:"conn_time,omitempty"`               // 连接时间
	Duration             int64                  `bson:"duration,omitempty"`                // 持续时间
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogText

type LogText struct {
	gmeta.Meta           `collection:"log_text" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	Stream               bool                   `bson:"stream,omitempty"`                  // 流式
	Messages             []common.Message       `bson:"messages,omitempty"`                // 完整提示(提问)
	Prompt               string                 `bson:"prompt,omitempty"`                  // 提示(提问)
	Completion           string                 `bson:"completion,omitempty"`              // 补全(回答)
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	ConnTime             int64                  `bson:"conn_time,omitempty"`               // 连接时间
	Duration             int64                  `bson:"duration,omitempty"`                // 持续时间
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type LogVideo

type LogVideo struct {
	gmeta.Meta           `collection:"log_video" bson:"-"`
	TraceId              string                 `bson:"trace_id,omitempty"`                // 日志ID
	UserId               int                    `bson:"user_id,omitempty"`                 // 用户ID
	AppId                int                    `bson:"app_id,omitempty"`                  // 应用ID
	ProviderId           string                 `bson:"provider_id,omitempty"`             // 提供商ID
	ProviderName         string                 `bson:"provider_name,omitempty"`           // 提供商名称
	ModelId              string                 `bson:"model_id,omitempty"`                // 模型ID
	ModelName            string                 `bson:"model_name,omitempty"`              // 模型名称
	Model                string                 `bson:"model,omitempty"`                   // 模型
	ModelType            int                    `bson:"model_type,omitempty"`              // 模型类型
	Key                  string                 `bson:"key,omitempty"`                     // 密钥
	IsEnablePresetConfig bool                   `bson:"is_enable_preset_config,omitempty"` // 是否启用预设配置
	PresetConfig         common.PresetConfig    `bson:"preset_config,omitempty"`           // 预设配置
	IsEnableModelAgent   bool                   `bson:"is_enable_model_agent,omitempty"`   // 是否启用模型代理
	ModelAgentId         string                 `bson:"model_agent_id,omitempty"`          // 模型代理ID
	ModelAgent           *ModelAgent            `bson:"model_agent,omitempty"`             // 模型代理信息
	IsEnableForward      bool                   `bson:"is_enable_forward,omitempty"`       // 是否启用模型转发
	ForwardConfig        *common.ForwardConfig  `bson:"forward_config,omitempty"`          // 模型转发配置
	IsSmartMatch         bool                   `bson:"is_smart_match,omitempty"`          // 是否智能匹配
	IsEnableFallback     bool                   `bson:"is_enable_fallback,omitempty"`      // 是否启用后备
	FallbackConfig       *common.FallbackConfig `bson:"fallback_config,omitempty"`         // 后备配置
	RealModelId          string                 `bson:"real_model_id,omitempty"`           // 真实模型ID
	RealModelName        string                 `bson:"real_model_name,omitempty"`         // 真实模型名称
	RealModel            string                 `bson:"real_model,omitempty"`              // 真实模型
	Action               string                 `bson:"action,omitempty"`                  // 接口
	VideoId              string                 `bson:"video_id,omitempty"`                // 视频ID
	RequestData          map[string]any         `bson:"request_data,omitempty"`            // 请求数据
	ResponseData         map[string]any         `bson:"response_data,omitempty"`           // 响应数据
	Spend                common.Spend           `bson:"spend,omitempty"`                   // 花费
	TotalTime            int64                  `bson:"total_time,omitempty"`              // 总时间
	InternalTime         int64                  `bson:"internal_time,omitempty"`           // 内耗时间
	ReqTime              int64                  `bson:"req_time,omitempty"`                // 请求时间
	ReqDate              string                 `bson:"req_date,omitempty"`                // 请求日期
	ClientIp             string                 `bson:"client_ip,omitempty"`               // 客户端IP
	RemoteIp             string                 `bson:"remote_ip,omitempty"`               // 远程IP
	LocalIp              string                 `bson:"local_ip,omitempty"`                // 本地IP
	ErrMsg               string                 `bson:"err_msg,omitempty"`                 // 错误信息
	IsRetry              bool                   `bson:"is_retry,omitempty"`                // 是否重试
	Retry                *common.Retry          `bson:"retry,omitempty"`                   // 重试
	Status               int                    `bson:"status,omitempty"`                  // 状态[1:成功, 2:中止, 3:重试, -1:失败]
	Host                 string                 `bson:"host,omitempty"`                    // Host
	Method               string                 `bson:"method,omitempty"`                  // Method
	Path                 string                 `bson:"path,omitempty"`                    // Path
	Rid                  int                    `bson:"rid,omitempty"`                     // 代理商ID
	Creator              string                 `bson:"creator,omitempty"`                 // 创建人
	Updater              string                 `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64                  `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64                  `bson:"updated_at,omitempty"`              // 更新时间
}

type ModelAgent

type ModelAgent struct {
	gmeta.Meta           `collection:"model_agent" bson:"-"`
	ProviderId           string   `bson:"provider_id,omitempty"`             // 提供商ID
	Name                 string   `bson:"name,omitempty"`                    // 模型代理名称
	BaseUrl              string   `bson:"base_url,omitempty"`                // 模型代理地址
	Path                 string   `bson:"path,omitempty"`                    // 模型代理地址路径
	Weight               int      `bson:"weight,omitempty"`                  // 权重
	BillingMethods       []int    `bson:"billing_methods,omitempty"`         // 计费方式[1:按Tokens, 2:按次]
	Models               []string `bson:"models,omitempty"`                  // 绑定模型
	IsEnableModelReplace bool     `bson:"is_enable_model_replace,omitempty"` // 是否启用模型替换
	ReplaceModels        []string `bson:"replace_models,omitempty"`          // 替换模型
	TargetModels         []string `bson:"target_models,omitempty"`           // 目标模型
	IsNeverDisable       bool     `bson:"is_never_disable,omitempty"`        // 是否永不禁用
	LbStrategy           int      `bson:"lb_strategy,omitempty"`             // 密钥负载均衡策略[1:轮询, 2:权重]
	Remark               string   `bson:"remark,omitempty"`                  // 备注
	Status               int      `bson:"status,omitempty"`                  // 状态[1:正常, 2:禁用, -1:删除]
	IsAutoDisabled       bool     `bson:"is_auto_disabled,omitempty"`        // 是否自动禁用
	AutoDisabledReason   string   `bson:"auto_disabled_reason,omitempty"`    // 自动禁用原因
	Creator              string   `bson:"creator,omitempty"`                 // 创建人
	Updater              string   `bson:"updater,omitempty"`                 // 更新人
	CreatedAt            int64    `bson:"created_at,omitempty"`              // 创建时间
	UpdatedAt            int64    `bson:"updated_at,omitempty"`              // 更新时间
}

type TaskBatch

type TaskBatch struct {
	gmeta.Meta   `collection:"task_batch" bson:"-"`
	TraceId      string         `bson:"trace_id,omitempty"`       // 日志ID
	UserId       int            `bson:"user_id,omitempty"`        // 用户ID
	AppId        int            `bson:"app_id,omitempty"`         // 应用ID
	Model        string         `bson:"model,omitempty"`          // 模型
	BatchId      string         `bson:"batch_id,omitempty"`       // 批处理ID
	InputFileId  string         `bson:"input_file_id,omitempty"`  // 输入文件ID
	OutputFileId string         `bson:"output_file_id,omitempty"` // 输出文件ID
	ErrorFileId  string         `bson:"error_file_id,omitempty"`  // 错误文件ID
	Status       string         `bson:"status,omitempty"`         // 状态[validating:验证中, in_progress:进行中, finalizing:定稿中, completed:已完成, cancelling:取消中, cancelled:已取消, failed:已失败, expired:已过期, deleted:已删除]
	InProgressAt int64          `bson:"in_progress_at,omitempty"` // 进行时间
	FinalizingAt int64          `bson:"finalizing_at,omitempty"`  // 定稿时间
	CompletedAt  int64          `bson:"completed_at,omitempty"`   // 完成时间
	ExpiresAt    int64          `bson:"expires_at,omitempty"`     // 过期时间
	CancellingAt int64          `bson:"cancelling_at,omitempty"`  // 取消时间
	CancelledAt  int64          `bson:"cancelled_at,omitempty"`   // 已取消时间
	FailedAt     int64          `bson:"failed_at,omitempty"`      // 失败时间
	ResponseData map[string]any `bson:"response_data,omitempty"`  // 响应数据
	Error        map[string]any `bson:"error,omitempty"`          // 错误信息
	Rid          int            `bson:"rid,omitempty"`            // 代理商ID
	Creator      string         `bson:"creator,omitempty"`        // 创建人
	Updater      string         `bson:"updater,omitempty"`        // 更新人
	CreatedAt    int64          `bson:"created_at,omitempty"`     // 创建时间
	UpdatedAt    int64          `bson:"updated_at,omitempty"`     // 更新时间
}

type TaskFile

type TaskFile struct {
	gmeta.Meta   `collection:"task_file" bson:"-"`
	TraceId      string            `bson:"trace_id,omitempty"`       // 日志ID
	UserId       int               `bson:"user_id,omitempty"`        // 用户ID
	AppId        int               `bson:"app_id,omitempty"`         // 应用ID
	Model        string            `bson:"model,omitempty"`          // 模型
	Purpose      string            `bson:"purpose,omitempty"`        // 用途[assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, user_data]
	FileId       string            `bson:"file_id,omitempty"`        // 文件ID
	FileName     string            `bson:"file_name,omitempty"`      // 文件名
	Bytes        int               `bson:"bytes,omitempty"`          // 文件大小
	Status       string            `bson:"status,omitempty"`         // 状态[uploaded:已上传, processing:处理中, processed:已处理, error:已失败, expired:已过期, deleted:已删除]
	ExpiresAt    int64             `bson:"expires_at,omitempty"`     // 过期时间
	FileUrl      string            `bson:"file_url,omitempty"`       // 文件地址
	FilePath     string            `bson:"file_path,omitempty"`      // 文件路径
	ResponseData map[string]any    `bson:"response_data,omitempty"`  // 响应数据
	Error        *serrors.ApiError `bson:"error,omitempty"`          // 错误信息
	BatchTraceId string            `bson:"batch_trace_id,omitempty"` // 批处理日志ID
	Rid          int               `bson:"rid,omitempty"`            // 代理商ID
	Creator      string            `bson:"creator,omitempty"`        // 创建人
	Updater      string            `bson:"updater,omitempty"`        // 更新人
	CreatedAt    int64             `bson:"created_at,omitempty"`     // 创建时间
	UpdatedAt    int64             `bson:"updated_at,omitempty"`     // 更新时间
}

type TaskVideo

type TaskVideo struct {
	gmeta.Meta         `collection:"task_video" bson:"-"`
	TraceId            string             `bson:"trace_id,omitempty"`              // 日志ID
	UserId             int                `bson:"user_id,omitempty"`               // 用户ID
	AppId              int                `bson:"app_id,omitempty"`                // 应用ID
	Model              string             `bson:"model,omitempty"`                 // 模型
	VideoId            string             `bson:"video_id,omitempty"`              // 视频ID
	Width              int                `bson:"width,omitempty"`                 // 宽度
	Height             int                `bson:"height,omitempty"`                // 高度
	Seconds            int                `bson:"seconds,omitempty"`               // 秒数
	Prompt             string             `bson:"prompt,omitempty"`                // 提示
	Progress           int                `bson:"progress,omitempty"`              // 进度
	RemixedFromVideoId string             `bson:"remixed_from_video_id,omitempty"` // 混合ID
	Status             string             `bson:"status,omitempty"`                // 状态[queued:排队中, in_progress:进行中, completed:已完成, failed:已失败, expired:已过期, deleted:已删除]
	CompletedAt        int64              `bson:"completed_at,omitempty"`          // 完成时间
	ExpiresAt          int64              `bson:"expires_at,omitempty"`            // 过期时间
	VideoUrl           string             `bson:"video_url,omitempty"`             // 视频地址
	FileName           string             `bson:"file_name,omitempty"`             // 文件名
	FilePath           string             `bson:"file_path,omitempty"`             // 文件路径
	Error              *smodel.VideoError `bson:"error,omitempty"`                 // 错误信息
	Rid                int                `bson:"rid,omitempty"`                   // 代理商ID
	Creator            string             `bson:"creator,omitempty"`               // 创建人
	Updater            string             `bson:"updater,omitempty"`               // 更新人
	CreatedAt          int64              `bson:"created_at,omitempty"`            // 创建时间
	UpdatedAt          int64              `bson:"updated_at,omitempty"`            // 更新时间
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL