feat(gateway): 补齐桌面端高级媒体直连接口
ci / verify (pull_request) Successful in 15m34s
ci / verify (pull_request) Successful in 15m34s
新增图片矢量化、视频超分、每日用量、计价与任务隔离能力,并通过环境变量解析平台凭据。 已通过 Go 全量门禁、迁移检查、镜像构建以及 Vectorizer 五格式和 Topaz 3 秒视频真实 DEV 验收。
This commit is contained in:
@@ -210,17 +210,31 @@ type PricingEstimateResponse struct {
|
||||
RequestFingerprint string `json:"requestFingerprint" example:"76ef6a537de8e71bd1ca93acadc078dbdbfa9f17e45224e4f9df59f535d2886f"`
|
||||
}
|
||||
|
||||
type DailyTokenUsageResponse struct {
|
||||
Items []store.DailyTokenUsage `json:"items"`
|
||||
TokenDays []store.DailyTokenUsage `json:"tokenDays"`
|
||||
Summary dailyTokenUsageSummary `json:"summary"`
|
||||
Range map[string]string `json:"range"`
|
||||
}
|
||||
|
||||
type TaskRequest struct {
|
||||
Model string `json:"model" example:"gpt-4o-mini"`
|
||||
Messages []ChatMessage `json:"messages,omitempty"`
|
||||
Input interface{} `json:"input,omitempty"`
|
||||
Prompt string `json:"prompt,omitempty" example:"A watercolor robot reading a book"`
|
||||
Text string `json:"text,omitempty" example:"Hello from EasyAI audio synthesis."`
|
||||
TextFileID string `json:"text_file_id,omitempty" example:""`
|
||||
VoiceID string `json:"voice_id,omitempty" example:"female-shaonv"`
|
||||
Stream *bool `json:"stream,omitempty" example:"false"`
|
||||
RunMode string `json:"runMode,omitempty" example:"simulation"`
|
||||
MaxTokens *int `json:"max_tokens,omitempty" example:"512"`
|
||||
Model string `json:"model" example:"gpt-4o-mini"`
|
||||
Messages []ChatMessage `json:"messages,omitempty"`
|
||||
Input interface{} `json:"input,omitempty"`
|
||||
Query string `json:"query,omitempty" example:"Which document mentions EasyAI Gateway?"`
|
||||
Documents []string `json:"documents,omitempty"`
|
||||
Prompt string `json:"prompt,omitempty" example:"A watercolor robot reading a book"`
|
||||
Text string `json:"text,omitempty" example:"Hello from EasyAI audio synthesis."`
|
||||
TextFileID string `json:"text_file_id,omitempty" example:""`
|
||||
VoiceID string `json:"voice_id,omitempty" example:"female-shaonv"`
|
||||
AudioURL string `json:"audio_url,omitempty" example:"https://example.com/source-voice.mp3"`
|
||||
DisplayName string `json:"display_name,omitempty" example:"EasyAI DEV acceptance"`
|
||||
PromptAudioURL string `json:"prompt_audio_url,omitempty" example:"https://example.com/prompt-voice.mp3"`
|
||||
PromptText string `json:"prompt_text,omitempty" example:"EasyAI voice clone prompt."`
|
||||
PreviewModel string `json:"preview_model,omitempty" example:"speech-2.8-hd"`
|
||||
Stream *bool `json:"stream,omitempty" example:"false"`
|
||||
RunMode string `json:"runMode,omitempty" example:"simulation"`
|
||||
MaxTokens *int `json:"max_tokens,omitempty" example:"512"`
|
||||
// MaxCompletionTokens includes visible output and reasoning tokens.
|
||||
MaxCompletionTokens *int `json:"max_completion_tokens,omitempty" example:"512"`
|
||||
MaxOutputTokens *int `json:"max_output_tokens,omitempty" example:"512"`
|
||||
@@ -368,6 +382,34 @@ type ImageEditRequest struct {
|
||||
RunMode string `json:"runMode,omitempty" example:"simulation"`
|
||||
}
|
||||
|
||||
type ImageVectorizeSource struct {
|
||||
URL string `json:"url,omitempty" example:"https://example.com/source.png"`
|
||||
VectorizerTaskID string `json:"vectorizerTaskId,omitempty" example:"9f4d8f3d-5f5f-4bb7-a4be-344a9f930e25"`
|
||||
}
|
||||
|
||||
type ImageVectorizeRequest struct {
|
||||
Model string `json:"model,omitempty" example:"easy-image-vectorizer-1"`
|
||||
Source ImageVectorizeSource `json:"source"`
|
||||
Format string `json:"format,omitempty" example:"svg" enums:"svg,eps,pdf,dxf,png"`
|
||||
MaxColors int `json:"maxColors,omitempty" example:"16" enums:"0,2,4,8,16,32"`
|
||||
CleanupLevel string `json:"cleanupLevel,omitempty" example:"standard" enums:"low,standard,strong"`
|
||||
}
|
||||
|
||||
type VideoUpscaleRequest struct {
|
||||
Model string `json:"model,omitempty" example:"easy-proteus-standard-4"`
|
||||
VideoURL string `json:"video_url" example:"https://example.com/source.mp4"`
|
||||
Operation string `json:"operation,omitempty" example:"upscale" enums:"upscale"`
|
||||
TargetResolution string `json:"target_resolution,omitempty" example:"1080p"`
|
||||
OutputWidth int `json:"output_width,omitempty" example:"1920"`
|
||||
OutputHeight int `json:"output_height,omitempty" example:"1080"`
|
||||
PreserveAudio *bool `json:"preserve_audio,omitempty" example:"true"`
|
||||
Duration float64 `json:"duration,omitempty" example:"3"`
|
||||
SourceResolution string `json:"source_resolution,omitempty" example:"480p"`
|
||||
SourceFrameRate float64 `json:"source_frame_rate,omitempty" example:"24"`
|
||||
TargetFrameRate float64 `json:"target_frame_rate,omitempty" example:"24"`
|
||||
SlowMotionRate float64 `json:"slow_motion_rate,omitempty" example:"1"`
|
||||
}
|
||||
|
||||
type VideoGenerationRequest struct {
|
||||
Model string `json:"model" example:"video-model"`
|
||||
Prompt string `json:"prompt" example:"A cinematic drone shot over mountains"`
|
||||
|
||||
Reference in New Issue
Block a user