mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
feat(commands): localize multimodal command help
This commit is contained in:
@@ -2,20 +2,29 @@ import { defineCommand, detectOutputFormat } from "bailian-cli-core";
|
||||
import { emitResult, emitBare } from "bailian-cli-runtime";
|
||||
|
||||
export default defineCommand({
|
||||
description: "Upload a local file to DashScope temporary storage (48h)",
|
||||
description: {
|
||||
"en-US": "Upload a local file to DashScope temporary storage (48h)",
|
||||
"zh-CN": "将本地文件上传到 DashScope 临时存储(保留 48 小时)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--file <path> --model <model>",
|
||||
flags: {
|
||||
file: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Local file to upload (image, video, audio)",
|
||||
description: {
|
||||
"en-US": "Local file to upload (image, video, audio)",
|
||||
"zh-CN": "要上传的本地文件(图片、视频或音频)",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Target model name (file is bound to this model)",
|
||||
description: {
|
||||
"en-US": "Target model name (file is bound to this model)",
|
||||
"zh-CN": "目标模型名称(文件将与该模型绑定)",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -35,41 +35,67 @@ const EDIT_FLAGS = {
|
||||
image: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Source image URL or local file path (repeatable for multi-image merge)",
|
||||
description: {
|
||||
"en-US": "Source image URL or local file path (repeatable for multi-image merge)",
|
||||
"zh-CN": "源图片 URL 或本地文件路径(多图融合时可重复)",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
prompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Edit instruction text",
|
||||
description: { "en-US": "Edit instruction text", "zh-CN": "编辑指令文本" },
|
||||
required: true,
|
||||
},
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Model ID (default: qwen-image-3.0)",
|
||||
description: {
|
||||
"en-US": "Model ID (default: qwen-image-3.0)",
|
||||
"zh-CN": "模型 ID(默认:qwen-image-3.0)",
|
||||
},
|
||||
},
|
||||
size: {
|
||||
type: "string",
|
||||
valueHint: "<W*H>",
|
||||
description: "Output image size: ratio (3:4, 16:9) or pixels (2048*2048)",
|
||||
description: {
|
||||
"en-US": "Output image size: ratio (3:4, 16:9) or pixels (2048*2048)",
|
||||
"zh-CN": "输出图片尺寸:比例(3:4、16:9)或像素(2048*2048)",
|
||||
},
|
||||
},
|
||||
n: {
|
||||
type: "number",
|
||||
valueHint: "<count>",
|
||||
description: "Number of images (default: 1, max: 6)",
|
||||
description: {
|
||||
"en-US": "Number of images (default: 1, max: 6)",
|
||||
"zh-CN": "图片数量(默认:1,最多:6)",
|
||||
},
|
||||
},
|
||||
seed: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: {
|
||||
"en-US": "Random seed for reproducible results",
|
||||
"zh-CN": "用于复现结果的随机种子",
|
||||
},
|
||||
},
|
||||
seed: { type: "number", valueHint: "<n>", description: "Random seed for reproducible results" },
|
||||
negativePrompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Negative prompt to exclude unwanted content",
|
||||
description: {
|
||||
"en-US": "Negative prompt to exclude unwanted content",
|
||||
"zh-CN": "负向提示词,用于排除不需要的内容",
|
||||
},
|
||||
},
|
||||
function: {
|
||||
type: "string",
|
||||
valueHint: "<name>",
|
||||
description:
|
||||
"wanx*-imageedit function (default: description_edit). Examples: stylization_all, description_edit",
|
||||
description: {
|
||||
"en-US":
|
||||
"wanx*-imageedit function (default: description_edit). Examples: stylization_all, description_edit",
|
||||
"zh-CN":
|
||||
"wanx*-imageedit 功能(默认:description_edit)。例如:stylization_all、description_edit",
|
||||
},
|
||||
},
|
||||
promptExtend: {
|
||||
type: "boolean",
|
||||
@@ -81,24 +107,37 @@ const EDIT_FLAGS = {
|
||||
valueHint: "<bool>",
|
||||
description: BOOL_FLAG_WATERMARK,
|
||||
},
|
||||
outDir: { type: "string", valueHint: "<dir>", description: "Download images to directory" },
|
||||
outDir: {
|
||||
type: "string",
|
||||
valueHint: "<dir>",
|
||||
description: { "en-US": "Download images to directory", "zh-CN": "将图片下载到指定目录" },
|
||||
},
|
||||
outPrefix: {
|
||||
type: "string",
|
||||
valueHint: "<prefix>",
|
||||
description: "Filename prefix (default: edited)",
|
||||
description: {
|
||||
"en-US": "Filename prefix (default: edited)",
|
||||
"zh-CN": "文件名前缀(默认:edited)",
|
||||
},
|
||||
},
|
||||
...ASYNC_FLAG,
|
||||
...CONCURRENT_FLAG,
|
||||
pollInterval: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Polling interval when waiting (default: 3)",
|
||||
description: {
|
||||
"en-US": "Polling interval when waiting (default: 3)",
|
||||
"zh-CN": "等待任务时的轮询间隔(默认:3 秒)",
|
||||
},
|
||||
},
|
||||
} satisfies FlagsDef;
|
||||
type EditFlags = ParsedFlags<typeof EDIT_FLAGS>;
|
||||
|
||||
export default defineCommand({
|
||||
description: "Edit an existing image with text instructions (Qwen-Image / Wan 2.7)",
|
||||
description: {
|
||||
"en-US": "Edit an existing image with text instructions (Qwen-Image / Wan 2.7)",
|
||||
"zh-CN": "使用文本指令编辑现有图片(Qwen-Image / Wan 2.7)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--image <url> --prompt <text> [flags]",
|
||||
flags: EDIT_FLAGS,
|
||||
|
||||
@@ -31,31 +31,51 @@ import { BOOL_FLAG_PROMPT_EXTEND_IMAGE_GENERATE, BOOL_FLAG_WATERMARK } from "bai
|
||||
import { join } from "path";
|
||||
|
||||
const GENERATE_FLAGS = {
|
||||
prompt: { type: "string", valueHint: "<text>", description: "Image description", required: true },
|
||||
prompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: { "en-US": "Image description", "zh-CN": "图片描述" },
|
||||
required: true,
|
||||
},
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Model ID (default: qwen-image-3.0)",
|
||||
description: {
|
||||
"en-US": "Model ID (default: qwen-image-3.0)",
|
||||
"zh-CN": "模型 ID(默认:qwen-image-3.0)",
|
||||
},
|
||||
},
|
||||
size: {
|
||||
type: "string",
|
||||
valueHint: "<W*H>",
|
||||
description: "Image size: ratio (3:4, 16:9, 1:1) or pixels (2048*2048)",
|
||||
description: {
|
||||
"en-US": "Image size: ratio (3:4, 16:9, 1:1) or pixels (2048*2048)",
|
||||
"zh-CN": "图片尺寸:比例(3:4、16:9、1:1)或像素(2048*2048)",
|
||||
},
|
||||
},
|
||||
n: {
|
||||
type: "number",
|
||||
valueHint: "<count>",
|
||||
description: "Number of images per request (default: 1, max: 6)",
|
||||
description: {
|
||||
"en-US": "Number of images per request (default: 1, max: 6)",
|
||||
"zh-CN": "每次请求生成的图片数量(默认:1,最多:6)",
|
||||
},
|
||||
},
|
||||
seed: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Random seed for reproducible generation",
|
||||
description: {
|
||||
"en-US": "Random seed for reproducible generation",
|
||||
"zh-CN": "用于复现生成结果的随机种子",
|
||||
},
|
||||
},
|
||||
negativePrompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Negative prompt to exclude unwanted content",
|
||||
description: {
|
||||
"en-US": "Negative prompt to exclude unwanted content",
|
||||
"zh-CN": "负向提示词,用于排除不需要的内容",
|
||||
},
|
||||
},
|
||||
promptExtend: {
|
||||
type: "boolean",
|
||||
@@ -69,22 +89,35 @@ const GENERATE_FLAGS = {
|
||||
},
|
||||
...ASYNC_FLAG,
|
||||
...CONCURRENT_FLAG,
|
||||
outDir: { type: "string", valueHint: "<dir>", description: "Download images to directory" },
|
||||
outDir: {
|
||||
type: "string",
|
||||
valueHint: "<dir>",
|
||||
description: { "en-US": "Download images to directory", "zh-CN": "将图片下载到指定目录" },
|
||||
},
|
||||
outPrefix: {
|
||||
type: "string",
|
||||
valueHint: "<prefix>",
|
||||
description: "Filename prefix (default: image)",
|
||||
description: {
|
||||
"en-US": "Filename prefix (default: image)",
|
||||
"zh-CN": "文件名前缀(默认:image)",
|
||||
},
|
||||
},
|
||||
pollInterval: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Polling interval when waiting (default: 3)",
|
||||
description: {
|
||||
"en-US": "Polling interval when waiting (default: 3)",
|
||||
"zh-CN": "等待任务时的轮询间隔(默认:3 秒)",
|
||||
},
|
||||
},
|
||||
} satisfies FlagsDef;
|
||||
type GenerateFlags = ParsedFlags<typeof GENERATE_FLAGS>;
|
||||
|
||||
export default defineCommand({
|
||||
description: "Generate images (Qwen-Image / wan2.x)",
|
||||
description: {
|
||||
"en-US": "Generate images (Qwen-Image / wan2.x)",
|
||||
"zh-CN": "生成图片(Qwen-Image / wan2.x)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--prompt <text> [flags]",
|
||||
flags: GENERATE_FLAGS,
|
||||
|
||||
@@ -114,61 +114,108 @@ function buildWavHeader(dataLength: number): Buffer {
|
||||
}
|
||||
|
||||
export default defineCommand({
|
||||
description: "Multimodal chat with text + audio output (Qwen-Omni)",
|
||||
description: {
|
||||
"en-US": "Multimodal chat with text + audio output (Qwen-Omni)",
|
||||
"zh-CN": "支持文本输入与音频输出的多模态对话(Qwen-Omni)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--message <text> [flags]",
|
||||
flags: {
|
||||
message: {
|
||||
type: "array",
|
||||
valueHint: "<text>",
|
||||
description: "Message text (repeatable, prefix role: to set role)",
|
||||
description: {
|
||||
"en-US": "Message text (repeatable, prefix role: to set role)",
|
||||
"zh-CN": "消息文本(可重复;可使用 role: 前缀指定角色)",
|
||||
},
|
||||
},
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Model ID (default: qwen3.5-omni-plus)",
|
||||
description: {
|
||||
"en-US": "Model ID (default: qwen3.5-omni-plus)",
|
||||
"zh-CN": "模型 ID(默认:qwen3.5-omni-plus)",
|
||||
},
|
||||
},
|
||||
system: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: { "en-US": "System prompt", "zh-CN": "系统提示词" },
|
||||
},
|
||||
system: { type: "string", valueHint: "<text>", description: "System prompt" },
|
||||
image: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Image URL or local file (repeatable)",
|
||||
description: {
|
||||
"en-US": "Image URL or local file (repeatable)",
|
||||
"zh-CN": "图片 URL 或本地文件(可重复)",
|
||||
},
|
||||
},
|
||||
audio: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Audio URL or local file (.wav/.mp3/.amr/.aac/.m4a/.ogg/.3gp/.3gpp)",
|
||||
description: {
|
||||
"en-US": "Audio URL or local file (.wav/.mp3/.amr/.aac/.m4a/.ogg/.3gp/.3gpp)",
|
||||
"zh-CN": "音频 URL 或本地文件(.wav/.mp3/.amr/.aac/.m4a/.ogg/.3gp/.3gpp)",
|
||||
},
|
||||
},
|
||||
video: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Video file URL / local path, or comma-separated frame URLs",
|
||||
description: {
|
||||
"en-US": "Video file URL / local path, or comma-separated frame URLs",
|
||||
"zh-CN": "视频文件 URL / 本地路径,或以逗号分隔的帧 URL",
|
||||
},
|
||||
},
|
||||
voice: {
|
||||
type: "string",
|
||||
valueHint: "<voice>",
|
||||
description: "Output voice ID (default: Tina). Use --list-voices to see all options",
|
||||
description: {
|
||||
"en-US": "Output voice ID (default: Tina). Use --list-voices to see all options",
|
||||
"zh-CN": "输出音色 ID(默认:Tina)。使用 --list-voices 查看所有选项",
|
||||
},
|
||||
},
|
||||
listVoices: {
|
||||
type: "switch",
|
||||
description: "List available output voices and exit",
|
||||
description: {
|
||||
"en-US": "List available output voices and exit",
|
||||
"zh-CN": "列出可用的输出音色并退出",
|
||||
},
|
||||
},
|
||||
audioFormat: {
|
||||
type: "string",
|
||||
valueHint: "<fmt>",
|
||||
description: "Audio output format (default: wav)",
|
||||
description: {
|
||||
"en-US": "Audio output format (default: wav)",
|
||||
"zh-CN": "音频输出格式(默认:wav)",
|
||||
},
|
||||
},
|
||||
audioOut: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Save audio to file (default: auto-generate)",
|
||||
description: {
|
||||
"en-US": "Save audio to file (default: auto-generate)",
|
||||
"zh-CN": "将音频保存到文件(默认:自动生成路径)",
|
||||
},
|
||||
},
|
||||
textOnly: {
|
||||
type: "switch",
|
||||
description: {
|
||||
"en-US": "Output text only, no audio generation",
|
||||
"zh-CN": "仅输出文本,不生成音频",
|
||||
},
|
||||
},
|
||||
maxTokens: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: { "en-US": "Maximum tokens to generate", "zh-CN": "最大生成 Token 数" },
|
||||
},
|
||||
textOnly: { type: "switch", description: "Output text only, no audio generation" },
|
||||
maxTokens: { type: "number", valueHint: "<n>", description: "Maximum tokens to generate" },
|
||||
temperature: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Sampling temperature (0.0, 2.0]",
|
||||
description: {
|
||||
"en-US": "Sampling temperature (0.0, 2.0]",
|
||||
"zh-CN": "采样温度 (0.0, 2.0]",
|
||||
},
|
||||
},
|
||||
},
|
||||
exampleArgs: [
|
||||
|
||||
@@ -24,39 +24,84 @@ const RECOGNIZE_FLAGS = {
|
||||
url: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Audio file URL or local file path (repeatable, max 100)",
|
||||
description: {
|
||||
"en-US": "Audio file URL or local file path (repeatable, max 100)",
|
||||
"zh-CN": "音频文件 URL 或本地文件路径(可重复,最多 100 个)",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
model: { type: "string", valueHint: "<model>", description: "Model ID (default: fun-asr)" },
|
||||
language: { type: "string", valueHint: "<lang>", description: "Language hint (e.g. zh, en, ja)" },
|
||||
diarization: { type: "switch", description: "Enable automatic speaker diarization" },
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: {
|
||||
"en-US": "Model ID (default: fun-asr)",
|
||||
"zh-CN": "模型 ID(默认:fun-asr)",
|
||||
},
|
||||
},
|
||||
language: {
|
||||
type: "string",
|
||||
valueHint: "<lang>",
|
||||
description: {
|
||||
"en-US": "Language hint (e.g. zh, en, ja)",
|
||||
"zh-CN": "语言提示(例如 zh、en、ja)",
|
||||
},
|
||||
},
|
||||
diarization: {
|
||||
type: "switch",
|
||||
description: {
|
||||
"en-US": "Enable automatic speaker diarization",
|
||||
"zh-CN": "启用自动说话人分离",
|
||||
},
|
||||
},
|
||||
speakerCount: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Expected number of speakers (requires --diarization)",
|
||||
description: {
|
||||
"en-US": "Expected number of speakers (requires --diarization)",
|
||||
"zh-CN": "预期的说话人数量(需启用 --diarization)",
|
||||
},
|
||||
},
|
||||
vocabularyId: {
|
||||
type: "string",
|
||||
valueHint: "<id>",
|
||||
description: "Hot-word vocabulary ID for improved accuracy",
|
||||
description: {
|
||||
"en-US": "Hot-word vocabulary ID for improved accuracy",
|
||||
"zh-CN": "用于提升识别准确率的热词表 ID",
|
||||
},
|
||||
},
|
||||
channelId: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: {
|
||||
"en-US": "Audio channel ID (default: 0)",
|
||||
"zh-CN": "音频声道 ID(默认:0)",
|
||||
},
|
||||
},
|
||||
channelId: { type: "number", valueHint: "<n>", description: "Audio channel ID (default: 0)" },
|
||||
out: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Save full transcription result to JSON file",
|
||||
description: {
|
||||
"en-US": "Save full transcription result to JSON file",
|
||||
"zh-CN": "将完整转写结果保存到 JSON 文件",
|
||||
},
|
||||
},
|
||||
...ASYNC_FLAG,
|
||||
pollInterval: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Polling interval in seconds (default: 2)",
|
||||
description: {
|
||||
"en-US": "Polling interval in seconds (default: 2)",
|
||||
"zh-CN": "轮询间隔,单位为秒(默认:2)",
|
||||
},
|
||||
},
|
||||
} satisfies FlagsDef;
|
||||
type RecognizeFlags = ParsedFlags<typeof RECOGNIZE_FLAGS>;
|
||||
|
||||
export default defineCommand({
|
||||
description: "Recognize speech from audio files (FunAudio-ASR)",
|
||||
description: {
|
||||
"en-US": "Recognize speech from audio files (FunAudio-ASR)",
|
||||
"zh-CN": "识别音频文件中的语音(FunAudio-ASR)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--url <audio-url> [flags]",
|
||||
flags: RECOGNIZE_FLAGS,
|
||||
|
||||
@@ -149,76 +149,142 @@ const SYNTHESIZE_FLAGS = {
|
||||
text: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Text to synthesize into speech (or use --text-file)",
|
||||
description: {
|
||||
"en-US": "Text to synthesize into speech (or use --text-file)",
|
||||
"zh-CN": "要合成为语音的文本(也可使用 --text-file)",
|
||||
},
|
||||
},
|
||||
textFile: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Read text from a file instead of --text",
|
||||
description: {
|
||||
"en-US": "Read text from a file instead of --text",
|
||||
"zh-CN": "从文件读取文本,而非使用 --text",
|
||||
},
|
||||
},
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description:
|
||||
"Model ID (default: cosyvoice-v3-flash). System voices available for cosyvoice-v3-flash",
|
||||
description: {
|
||||
"en-US":
|
||||
"Model ID (default: cosyvoice-v3-flash). System voices available for cosyvoice-v3-flash",
|
||||
"zh-CN": "模型 ID(默认:cosyvoice-v3-flash)。cosyvoice-v3-flash 支持系统音色",
|
||||
},
|
||||
},
|
||||
voice: {
|
||||
type: "string",
|
||||
valueHint: "<voice>",
|
||||
description:
|
||||
"Voice ID. Use --list-voices to see built-in voices for cosyvoice-v3-flash; for v3.5-flash provide a clone/design voice ID",
|
||||
description: {
|
||||
"en-US":
|
||||
"Voice ID. Use --list-voices to see built-in voices for cosyvoice-v3-flash; for v3.5-flash provide a clone/design voice ID",
|
||||
"zh-CN":
|
||||
"音色 ID。使用 --list-voices 查看 cosyvoice-v3-flash 的内置音色;使用 v3.5-flash 时需提供复刻/设计音色 ID",
|
||||
},
|
||||
},
|
||||
listVoices: {
|
||||
type: "switch",
|
||||
description:
|
||||
"List built-in system voices for the selected model and exit (console link shown in output)",
|
||||
description: {
|
||||
"en-US":
|
||||
"List built-in system voices for the selected model and exit (console link shown in output)",
|
||||
"zh-CN": "列出所选模型的内置系统音色并退出(输出中会显示控制台链接)",
|
||||
},
|
||||
},
|
||||
format: {
|
||||
type: "string",
|
||||
valueHint: "<format>",
|
||||
description: "Audio format: mp3, pcm, wav, opus (default: mp3)",
|
||||
description: {
|
||||
"en-US": "Audio format: mp3, pcm, wav, opus (default: mp3)",
|
||||
"zh-CN": "音频格式:mp3、pcm、wav、opus(默认:mp3)",
|
||||
},
|
||||
choices: ["mp3", "pcm", "wav", "opus"] as const,
|
||||
},
|
||||
sampleRate: {
|
||||
type: "string",
|
||||
valueHint: "<rate>",
|
||||
description: "Audio sample rate in Hz (e.g. 24000)",
|
||||
description: {
|
||||
"en-US": "Audio sample rate in Hz (e.g. 24000)",
|
||||
"zh-CN": "音频采样率,单位为 Hz(例如 24000)",
|
||||
},
|
||||
},
|
||||
volume: {
|
||||
type: "string",
|
||||
valueHint: "<volume>",
|
||||
description: {
|
||||
"en-US": "Volume 0-100 (default: 50)",
|
||||
"zh-CN": "音量 0–100(默认:50)",
|
||||
},
|
||||
},
|
||||
rate: {
|
||||
type: "string",
|
||||
valueHint: "<rate>",
|
||||
description: {
|
||||
"en-US": "Speech rate 0.5-2.0 (default: 1.0)",
|
||||
"zh-CN": "语速 0.5–2.0(默认:1.0)",
|
||||
},
|
||||
},
|
||||
volume: { type: "string", valueHint: "<volume>", description: "Volume 0-100 (default: 50)" },
|
||||
rate: { type: "string", valueHint: "<rate>", description: "Speech rate 0.5-2.0 (default: 1.0)" },
|
||||
pitch: {
|
||||
type: "string",
|
||||
valueHint: "<pitch>",
|
||||
description: "Pitch multiplier 0.5-2.0 (default: 1.0)",
|
||||
description: {
|
||||
"en-US": "Pitch multiplier 0.5-2.0 (default: 1.0)",
|
||||
"zh-CN": "音高倍数 0.5–2.0(默认:1.0)",
|
||||
},
|
||||
},
|
||||
seed: {
|
||||
type: "string",
|
||||
valueHint: "<seed>",
|
||||
description: "Random seed 0-65535 for reproducible synthesis",
|
||||
description: {
|
||||
"en-US": "Random seed 0-65535 for reproducible synthesis",
|
||||
"zh-CN": "用于复现合成结果的随机种子 0–65535",
|
||||
},
|
||||
},
|
||||
language: {
|
||||
type: "string",
|
||||
valueHint: "<lang>",
|
||||
description: "Language hint (e.g. zh, en, ja, ko, fr, de)",
|
||||
description: {
|
||||
"en-US": "Language hint (e.g. zh, en, ja, ko, fr, de)",
|
||||
"zh-CN": "语言提示(例如 zh、en、ja、ko、fr、de)",
|
||||
},
|
||||
},
|
||||
instruction: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: 'Natural language instruction to control speech style (e.g. "Use a gentle tone")',
|
||||
description: {
|
||||
"en-US": 'Natural language instruction to control speech style (e.g. "Use a gentle tone")',
|
||||
"zh-CN": "用于控制语音风格的自然语言指令(例如“使用温柔的语气”)",
|
||||
},
|
||||
},
|
||||
enableSsml: {
|
||||
type: "switch",
|
||||
description: {
|
||||
"en-US": "Enable SSML markup parsing in input text",
|
||||
"zh-CN": "解析输入文本中的 SSML 标记",
|
||||
},
|
||||
},
|
||||
enableSsml: { type: "switch", description: "Enable SSML markup parsing in input text" },
|
||||
out: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Save audio to file (default: auto-generate in temp dir)",
|
||||
description: {
|
||||
"en-US": "Save audio to file (default: auto-generate in temp dir)",
|
||||
"zh-CN": "将音频保存到文件(默认:在临时目录中自动生成路径)",
|
||||
},
|
||||
},
|
||||
stream: {
|
||||
type: "switch",
|
||||
description: {
|
||||
"en-US": "Stream raw PCM audio to stdout (pipe to player)",
|
||||
"zh-CN": "将原始 PCM 音频流式输出到 stdout(可通过管道传给播放器)",
|
||||
},
|
||||
},
|
||||
stream: { type: "switch", description: "Stream raw PCM audio to stdout (pipe to player)" },
|
||||
...CONCURRENT_FLAG,
|
||||
} satisfies FlagsDef;
|
||||
type SynthesizeFlags = ParsedFlags<typeof SYNTHESIZE_FLAGS>;
|
||||
|
||||
export default defineCommand({
|
||||
description: "Synthesize speech from text (CosyVoice TTS)",
|
||||
description: {
|
||||
"en-US": "Synthesize speech from text (CosyVoice TTS)",
|
||||
"zh-CN": "将文本合成为语音(CosyVoice TTS)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--text <text> [flags]",
|
||||
flags: SYNTHESIZE_FLAGS,
|
||||
|
||||
@@ -10,17 +10,25 @@ import { downloadFile, formatBytes } from "bailian-cli-runtime";
|
||||
import { emitResult, emitBare } from "bailian-cli-runtime";
|
||||
|
||||
export default defineCommand({
|
||||
description: "Download a completed video by task ID",
|
||||
description: {
|
||||
"en-US": "Download a completed video by task ID",
|
||||
"zh-CN": "通过任务 ID 下载已完成的视频",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--task-id <id> --out <path>",
|
||||
flags: {
|
||||
taskId: {
|
||||
type: "string",
|
||||
valueHint: "<id>",
|
||||
description: "Task ID to download from",
|
||||
description: { "en-US": "Task ID to download from", "zh-CN": "要下载的任务 ID" },
|
||||
required: true,
|
||||
},
|
||||
out: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: { "en-US": "Output file path", "zh-CN": "输出文件路径" },
|
||||
required: true,
|
||||
},
|
||||
out: { type: "string", valueHint: "<path>", description: "Output file path", required: true },
|
||||
},
|
||||
exampleArgs: [
|
||||
"--task-id 3b256896-xxxx --out video.mp4",
|
||||
|
||||
@@ -21,56 +21,86 @@ import { emitResult, emitBare } from "bailian-cli-runtime";
|
||||
import { BOOL_FLAG_PROMPT_EXTEND_API_DEFAULT, BOOL_FLAG_WATERMARK } from "bailian-cli-runtime";
|
||||
|
||||
export default defineCommand({
|
||||
description:
|
||||
"Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.)",
|
||||
description: {
|
||||
"en-US":
|
||||
"Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.)",
|
||||
"zh-CN": "使用 happyhorse-1.0-video-edit 编辑视频(风格转换、对象替换等)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--video <url> --prompt <text> [flags]",
|
||||
flags: {
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Model ID (default: happyhorse-1.0-video-edit)",
|
||||
description: {
|
||||
"en-US": "Model ID (default: happyhorse-1.0-video-edit)",
|
||||
"zh-CN": "模型 ID(默认:happyhorse-1.0-video-edit)",
|
||||
},
|
||||
},
|
||||
video: {
|
||||
type: "string",
|
||||
valueHint: "<url>",
|
||||
description: "Input video URL or local file (mp4/mov, 2-10s)",
|
||||
description: {
|
||||
"en-US": "Input video URL or local file (mp4/mov, 2-10s)",
|
||||
"zh-CN": "输入视频 URL 或本地文件(mp4/mov,2–10 秒)",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
prompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: 'Edit instruction (e.g. "Convert the scene to a claymation style")',
|
||||
description: {
|
||||
"en-US": 'Edit instruction (e.g. "Convert the scene to a claymation style")',
|
||||
"zh-CN": "编辑指令(例如“将场景转换为黏土动画风格”)",
|
||||
},
|
||||
},
|
||||
refImage: {
|
||||
type: "string",
|
||||
valueHint: "<url>",
|
||||
description: "Reference image URL (up to 4, comma-separated)",
|
||||
description: {
|
||||
"en-US": "Reference image URL (up to 4, comma-separated)",
|
||||
"zh-CN": "参考图片 URL(最多 4 个,以逗号分隔)",
|
||||
},
|
||||
},
|
||||
negativePrompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Negative prompt to exclude unwanted content",
|
||||
description: {
|
||||
"en-US": "Negative prompt to exclude unwanted content",
|
||||
"zh-CN": "负向提示词,用于排除不需要的内容",
|
||||
},
|
||||
},
|
||||
resolution: {
|
||||
type: "string",
|
||||
valueHint: "<res>",
|
||||
description: "Resolution: 720P or 1080P (default: 1080P)",
|
||||
description: {
|
||||
"en-US": "Resolution: 720P or 1080P (default: 1080P)",
|
||||
"zh-CN": "分辨率:720P 或 1080P(默认:1080P)",
|
||||
},
|
||||
},
|
||||
ratio: {
|
||||
type: "string",
|
||||
valueHint: "<ratio>",
|
||||
description: "Aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4)",
|
||||
description: {
|
||||
"en-US": "Aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4)",
|
||||
"zh-CN": "宽高比(16:9、9:16、1:1、4:3、3:4)",
|
||||
},
|
||||
},
|
||||
duration: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Output video duration in seconds (2-10)",
|
||||
description: {
|
||||
"en-US": "Output video duration in seconds (2-10)",
|
||||
"zh-CN": "输出视频时长,单位为秒(2–10)",
|
||||
},
|
||||
},
|
||||
audioSetting: {
|
||||
type: "string",
|
||||
valueHint: "<mode>",
|
||||
description: "Audio: auto (default) or origin (keep original)",
|
||||
description: {
|
||||
"en-US": "Audio: auto (default) or origin (keep original)",
|
||||
"zh-CN": "音频:auto(默认)或 origin(保留原音频)",
|
||||
},
|
||||
choices: ["auto", "origin"] as const,
|
||||
},
|
||||
promptExtend: {
|
||||
@@ -86,19 +116,28 @@ export default defineCommand({
|
||||
seed: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Random seed for reproducible generation",
|
||||
description: {
|
||||
"en-US": "Random seed for reproducible generation",
|
||||
"zh-CN": "用于复现生成结果的随机种子",
|
||||
},
|
||||
},
|
||||
download: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Save video to file on completion",
|
||||
description: {
|
||||
"en-US": "Save video to file on completion",
|
||||
"zh-CN": "完成后将视频保存到文件",
|
||||
},
|
||||
},
|
||||
...ASYNC_FLAG,
|
||||
...CONCURRENT_FLAG,
|
||||
pollInterval: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Polling interval when waiting (default: 15)",
|
||||
description: {
|
||||
"en-US": "Polling interval when waiting (default: 15)",
|
||||
"zh-CN": "等待任务时的轮询间隔(默认:15 秒)",
|
||||
},
|
||||
},
|
||||
},
|
||||
exampleArgs: [
|
||||
|
||||
@@ -22,46 +22,67 @@ import { emitResult, emitBare } from "bailian-cli-runtime";
|
||||
import { BOOL_FLAG_PROMPT_EXTEND_API_DEFAULT, BOOL_FLAG_WATERMARK } from "bailian-cli-runtime";
|
||||
|
||||
export default defineCommand({
|
||||
description:
|
||||
"Generate a video from text or image (happyhorse-1.1-t2v / happyhorse-1.1-i2v / wan2.6-t2v)",
|
||||
description: {
|
||||
"en-US":
|
||||
"Generate a video from text or image (happyhorse-1.1-t2v / happyhorse-1.1-i2v / wan2.6-t2v)",
|
||||
"zh-CN": "根据文本或图片生成视频(happyhorse-1.1-t2v / happyhorse-1.1-i2v / wan2.6-t2v)",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--prompt <text> [--image <url>] [flags]",
|
||||
flags: {
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Model ID (default: happyhorse-1.1-t2v, or happyhorse-1.1-i2v with --image)",
|
||||
description: {
|
||||
"en-US": "Model ID (default: happyhorse-1.1-t2v, or happyhorse-1.1-i2v with --image)",
|
||||
"zh-CN": "模型 ID(默认:happyhorse-1.1-t2v;使用 --image 时为 happyhorse-1.1-i2v)",
|
||||
},
|
||||
},
|
||||
prompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Video description",
|
||||
description: { "en-US": "Video description", "zh-CN": "视频描述" },
|
||||
required: true,
|
||||
},
|
||||
image: {
|
||||
type: "string",
|
||||
valueHint: "<url>",
|
||||
description: "Input image URL for image-to-video generation",
|
||||
description: {
|
||||
"en-US": "Input image URL for image-to-video generation",
|
||||
"zh-CN": "图生视频使用的输入图片 URL",
|
||||
},
|
||||
},
|
||||
negativePrompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Negative prompt to exclude unwanted content",
|
||||
description: {
|
||||
"en-US": "Negative prompt to exclude unwanted content",
|
||||
"zh-CN": "负向提示词,用于排除不需要的内容",
|
||||
},
|
||||
},
|
||||
resolution: {
|
||||
type: "string",
|
||||
valueHint: "<res>",
|
||||
description: "Resolution: 720P or 1080P (default: 1080P)",
|
||||
description: {
|
||||
"en-US": "Resolution: 720P or 1080P (default: 1080P)",
|
||||
"zh-CN": "分辨率:720P 或 1080P(默认:1080P)",
|
||||
},
|
||||
},
|
||||
ratio: {
|
||||
type: "string",
|
||||
valueHint: "<ratio>",
|
||||
description: "Aspect ratio (e.g. 16:9, 9:16, 1:1)",
|
||||
description: {
|
||||
"en-US": "Aspect ratio (e.g. 16:9, 9:16, 1:1)",
|
||||
"zh-CN": "宽高比(例如 16:9、9:16、1:1)",
|
||||
},
|
||||
},
|
||||
duration: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Video duration in seconds (default: 5)",
|
||||
description: {
|
||||
"en-US": "Video duration in seconds (default: 5)",
|
||||
"zh-CN": "视频时长,单位为秒(默认:5)",
|
||||
},
|
||||
},
|
||||
promptExtend: {
|
||||
type: "boolean",
|
||||
@@ -76,19 +97,28 @@ export default defineCommand({
|
||||
seed: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Random seed for reproducible generation",
|
||||
description: {
|
||||
"en-US": "Random seed for reproducible generation",
|
||||
"zh-CN": "用于复现生成结果的随机种子",
|
||||
},
|
||||
},
|
||||
download: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Save video to file on completion",
|
||||
description: {
|
||||
"en-US": "Save video to file on completion",
|
||||
"zh-CN": "完成后将视频保存到文件",
|
||||
},
|
||||
},
|
||||
...ASYNC_FLAG,
|
||||
...CONCURRENT_FLAG,
|
||||
pollInterval: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Polling interval when waiting (default: 5)",
|
||||
description: {
|
||||
"en-US": "Polling interval when waiting (default: 5)",
|
||||
"zh-CN": "等待任务时的轮询间隔(默认:5 秒)",
|
||||
},
|
||||
},
|
||||
},
|
||||
exampleArgs: [
|
||||
|
||||
@@ -22,52 +22,86 @@ import { emitResult, emitBare } from "bailian-cli-runtime";
|
||||
import { BOOL_FLAG_PROMPT_EXTEND_API_DEFAULT, BOOL_FLAG_WATERMARK } from "bailian-cli-runtime";
|
||||
|
||||
export default defineCommand({
|
||||
description:
|
||||
"Reference-to-video generation (happyhorse-1.1-r2v / wan2.6-r2v): multi-subject, multi-shot with voice",
|
||||
description: {
|
||||
"en-US":
|
||||
"Reference-to-video generation (happyhorse-1.1-r2v / wan2.6-r2v): multi-subject, multi-shot with voice",
|
||||
"zh-CN": "参考生视频(happyhorse-1.1-r2v / wan2.6-r2v):支持多主体、多镜头和语音",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--prompt <text> --image <url>... [--ref-video <url>...] [flags]",
|
||||
flags: {
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Model ID (default: happyhorse-1.1-r2v)",
|
||||
description: {
|
||||
"en-US": "Model ID (default: happyhorse-1.1-r2v)",
|
||||
"zh-CN": "模型 ID(默认:happyhorse-1.1-r2v)",
|
||||
},
|
||||
},
|
||||
prompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Video description with reference markers (image1, video1, etc.)",
|
||||
description: {
|
||||
"en-US": "Video description with reference markers (image1, video1, etc.)",
|
||||
"zh-CN": "包含引用标记的视频描述(image1、video1 等)",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
image: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Reference image URL or local file (repeatable for multiple subjects)",
|
||||
description: {
|
||||
"en-US": "Reference image URL or local file (repeatable for multiple subjects)",
|
||||
"zh-CN": "参考图片 URL 或本地文件(多个主体时可重复)",
|
||||
},
|
||||
},
|
||||
refVideo: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Reference video URL or local file (repeatable)",
|
||||
description: {
|
||||
"en-US": "Reference video URL or local file (repeatable)",
|
||||
"zh-CN": "参考视频 URL 或本地文件(可重复)",
|
||||
},
|
||||
},
|
||||
imageVoice: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Voice URL for corresponding image (pairs by position)",
|
||||
description: {
|
||||
"en-US": "Voice URL for corresponding image (pairs by position)",
|
||||
"zh-CN": "对应图片的语音 URL(按位置配对)",
|
||||
},
|
||||
},
|
||||
videoVoice: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Voice URL for corresponding ref-video (pairs by position)",
|
||||
description: {
|
||||
"en-US": "Voice URL for corresponding ref-video (pairs by position)",
|
||||
"zh-CN": "对应参考视频的语音 URL(按位置配对)",
|
||||
},
|
||||
},
|
||||
resolution: {
|
||||
type: "string",
|
||||
valueHint: "<res>",
|
||||
description: "Resolution: 720P or 1080P (default: 1080P)",
|
||||
description: {
|
||||
"en-US": "Resolution: 720P or 1080P (default: 1080P)",
|
||||
"zh-CN": "分辨率:720P 或 1080P(默认:1080P)",
|
||||
},
|
||||
},
|
||||
ratio: {
|
||||
type: "string",
|
||||
valueHint: "<ratio>",
|
||||
description: {
|
||||
"en-US": "Aspect ratio (16:9, 9:16, 1:1)",
|
||||
"zh-CN": "宽高比(16:9、9:16、1:1)",
|
||||
},
|
||||
},
|
||||
ratio: { type: "string", valueHint: "<ratio>", description: "Aspect ratio (16:9, 9:16, 1:1)" },
|
||||
duration: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Video duration in seconds (default: 5)",
|
||||
description: {
|
||||
"en-US": "Video duration in seconds (default: 5)",
|
||||
"zh-CN": "视频时长,单位为秒(默认:5)",
|
||||
},
|
||||
},
|
||||
promptExtend: {
|
||||
type: "boolean",
|
||||
@@ -82,19 +116,28 @@ export default defineCommand({
|
||||
seed: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Random seed for reproducible generation",
|
||||
description: {
|
||||
"en-US": "Random seed for reproducible generation",
|
||||
"zh-CN": "用于复现生成结果的随机种子",
|
||||
},
|
||||
},
|
||||
download: {
|
||||
type: "string",
|
||||
valueHint: "<path>",
|
||||
description: "Save video to file on completion",
|
||||
description: {
|
||||
"en-US": "Save video to file on completion",
|
||||
"zh-CN": "完成后将视频保存到文件",
|
||||
},
|
||||
},
|
||||
...ASYNC_FLAG,
|
||||
...CONCURRENT_FLAG,
|
||||
pollInterval: {
|
||||
type: "number",
|
||||
valueHint: "<seconds>",
|
||||
description: "Polling interval when waiting (default: 15)",
|
||||
description: {
|
||||
"en-US": "Polling interval when waiting (default: 15)",
|
||||
"zh-CN": "等待任务时的轮询间隔(默认:15 秒)",
|
||||
},
|
||||
},
|
||||
},
|
||||
exampleArgs: [
|
||||
|
||||
@@ -7,11 +7,16 @@ import {
|
||||
import { emitResult, emitBare } from "bailian-cli-runtime";
|
||||
|
||||
export default defineCommand({
|
||||
description: "Query async task status",
|
||||
description: { "en-US": "Query async task status", "zh-CN": "查询异步任务状态" },
|
||||
auth: "apiKey",
|
||||
usageArgs: "--task-id <id>",
|
||||
flags: {
|
||||
taskId: { type: "string", valueHint: "<id>", description: "Async task ID", required: true },
|
||||
taskId: {
|
||||
type: "string",
|
||||
valueHint: "<id>",
|
||||
description: { "en-US": "Async task ID", "zh-CN": "异步任务 ID" },
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
exampleArgs: [
|
||||
"--task-id 3b256896-3e70-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
|
||||
@@ -34,25 +34,41 @@ async function toImageUrl(image: string): Promise<string> {
|
||||
}
|
||||
|
||||
export default defineCommand({
|
||||
description: "Describe an image or video using Qwen-VL",
|
||||
description: {
|
||||
"en-US": "Describe an image or video using Qwen-VL",
|
||||
"zh-CN": "使用 Qwen-VL 描述图片或视频",
|
||||
},
|
||||
auth: "apiKey",
|
||||
usageArgs: "--image <path-or-url> [--video <url>] [--prompt <text>]",
|
||||
flags: {
|
||||
image: { type: "string", valueHint: "<path-or-url>", description: "Local image path or URL" },
|
||||
image: {
|
||||
type: "string",
|
||||
valueHint: "<path-or-url>",
|
||||
description: { "en-US": "Local image path or URL", "zh-CN": "本地图片路径或 URL" },
|
||||
},
|
||||
video: {
|
||||
type: "array",
|
||||
valueHint: "<url>",
|
||||
description: "Video file URL or local path (mp4/mov/avi/mkv/webm)",
|
||||
description: {
|
||||
"en-US": "Video file URL or local path (mp4/mov/avi/mkv/webm)",
|
||||
"zh-CN": "视频文件 URL 或本地路径(mp4/mov/avi/mkv/webm)",
|
||||
},
|
||||
},
|
||||
prompt: {
|
||||
type: "string",
|
||||
valueHint: "<text>",
|
||||
description: "Question about the content (default: auto-detected)",
|
||||
description: {
|
||||
"en-US": "Question about the content (default: auto-detected)",
|
||||
"zh-CN": "针对内容的问题(默认:自动识别)",
|
||||
},
|
||||
},
|
||||
model: {
|
||||
type: "string",
|
||||
valueHint: "<model>",
|
||||
description: "Vision model (default: qwen3-vl-plus)",
|
||||
description: {
|
||||
"en-US": "Vision model (default: qwen3-vl-plus)",
|
||||
"zh-CN": "视觉模型(默认:qwen3-vl-plus)",
|
||||
},
|
||||
},
|
||||
},
|
||||
exampleArgs: [
|
||||
|
||||
@@ -117,7 +117,10 @@ export const CONCURRENT_FLAG = {
|
||||
concurrent: {
|
||||
type: "number",
|
||||
valueHint: "<n>",
|
||||
description: "Run N parallel requests (default: 1)",
|
||||
description: {
|
||||
"en-US": "Run N parallel requests (default: 1)",
|
||||
"zh-CN": "并行发送 N 个请求(默认:1)",
|
||||
},
|
||||
},
|
||||
} satisfies FlagsDef;
|
||||
|
||||
@@ -125,7 +128,10 @@ export const CONCURRENT_FLAG = {
|
||||
export const ASYNC_FLAG = {
|
||||
async: {
|
||||
type: "switch",
|
||||
description: "Return async task id without waiting",
|
||||
description: {
|
||||
"en-US": "Return async task id without waiting",
|
||||
"zh-CN": "直接返回异步任务 ID,不等待任务完成",
|
||||
},
|
||||
},
|
||||
} satisfies FlagsDef;
|
||||
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
/** Shared --foo <bool> help text; keep wording consistent with actual CLI/request behavior. */
|
||||
|
||||
export const BOOL_FLAG_WATERMARK =
|
||||
"Enable watermark (true/false). Omit flag to use CLI default (true).";
|
||||
export const BOOL_FLAG_WATERMARK = {
|
||||
"en-US": "Enable watermark (true/false). Omit flag to use CLI default (true).",
|
||||
"zh-CN": "是否启用水印(true/false)。不传时使用 CLI 默认值 true。",
|
||||
};
|
||||
|
||||
/** CLI sends prompt_extend=true when flag omitted (qwen-image edit, etc.). */
|
||||
export const BOOL_FLAG_PROMPT_EXTEND_CLI_TRUE =
|
||||
"Enable prompt extend (true/false). Omit flag to use CLI default (true).";
|
||||
export const BOOL_FLAG_PROMPT_EXTEND_CLI_TRUE = {
|
||||
"en-US": "Enable prompt extend (true/false). Omit flag to use CLI default (true).",
|
||||
"zh-CN": "是否启用提示词扩展(true/false)。不传时使用 CLI 默认值 true。",
|
||||
};
|
||||
|
||||
/** Sync qwen-image defaults on; async models omit the field unless flag is set. */
|
||||
export const BOOL_FLAG_PROMPT_EXTEND_IMAGE_GENERATE =
|
||||
"Enable prompt extend (true/false). Omit flag: true for qwen-image sync; parameter omitted on async models (API default).";
|
||||
export const BOOL_FLAG_PROMPT_EXTEND_IMAGE_GENERATE = {
|
||||
"en-US":
|
||||
"Enable prompt extend (true/false). Omit flag: true for qwen-image sync; parameter omitted on async models (API default).",
|
||||
"zh-CN":
|
||||
"是否启用提示词扩展(true/false)。不传时:qwen-image 同步调用默认为 true;异步模型不传该参数(使用 API 默认值)。",
|
||||
};
|
||||
|
||||
/** CLI omits prompt_extend in the request when flag is unset (video commands). */
|
||||
export const BOOL_FLAG_PROMPT_EXTEND_API_DEFAULT =
|
||||
"Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default).";
|
||||
export const BOOL_FLAG_PROMPT_EXTEND_API_DEFAULT = {
|
||||
"en-US":
|
||||
"Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default).",
|
||||
"zh-CN": "是否启用提示词扩展(true/false)。不传时省略该参数(使用 DashScope 默认值)。",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user