compshare-cli 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {compshare_cli-0.4.0/src/compshare_cli.egg-info → compshare_cli-0.4.1}/PKG-INFO +1 -1
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/__init__.py +1 -1
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/minimax.py +3 -3
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/i18n.py +2 -2
- {compshare_cli-0.4.0 → compshare_cli-0.4.1/src/compshare_cli.egg-info}/PKG-INFO +1 -1
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_minimax.py +10 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/LICENSE +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/README.md +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/pyproject.toml +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/setup.cfg +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/__main__.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/actions.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/api.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/cli.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/__init__.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/ask.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/bandwidth.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/common.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/doctor.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/feedback.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/image.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/instance.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/storage.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/commands/team.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/config.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/errors.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/insights.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/instance_templates.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/location.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/output.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/parsing.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/qa.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/remote_jobs.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/runtime.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/sdk.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/ssh.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli/ssh_cache.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli.egg-info/SOURCES.txt +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli.egg-info/dependency_links.txt +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli.egg-info/entry_points.txt +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli.egg-info/requires.txt +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/src/compshare_cli.egg-info/top_level.txt +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_actions.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_api.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_bandwidth.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_cli.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_config.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_feedback.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_instance_templates.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_location.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_output.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_parsing.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_qa.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_release_version.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_remote_jobs.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_sdk.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_ssh.py +0 -0
- {compshare_cli-0.4.0 → compshare_cli-0.4.1}/tests/test_ssh_cache.py +0 -0
|
@@ -179,8 +179,8 @@ def _content(
|
|
|
179
179
|
text = prompt.strip()
|
|
180
180
|
if not text:
|
|
181
181
|
raise UsageError(tr("Prompt cannot be empty."))
|
|
182
|
-
if len(text) >
|
|
183
|
-
raise UsageError(tr("Prompt cannot exceed
|
|
182
|
+
if len(text) > 7000:
|
|
183
|
+
raise UsageError(tr("Prompt cannot exceed 7000 characters."))
|
|
184
184
|
if last_frame and not first_frame:
|
|
185
185
|
raise UsageError(tr("--last-frame requires --first-frame."))
|
|
186
186
|
if (first_frame or last_frame) and (reference_images or reference_videos or reference_audio):
|
|
@@ -234,7 +234,7 @@ def _task_path(task_id: str, *, query: bool) -> str:
|
|
|
234
234
|
@app.command("create", help="Create a MiniMax H3 video task.")
|
|
235
235
|
def create(
|
|
236
236
|
ctx: typer.Context,
|
|
237
|
-
prompt: str = typer.Argument(..., help="Video prompt; at most
|
|
237
|
+
prompt: str = typer.Argument(..., help="Video prompt; at most 7000 characters."),
|
|
238
238
|
resolution: str = typer.Option("768P", help="Output resolution: 768P, 1080P, or 2K."),
|
|
239
239
|
duration: int = typer.Option(5, min=4, max=15, help="Video duration in seconds (4-15)."),
|
|
240
240
|
ratio: str = typer.Option("16:9", help="Output ratio or adaptive for media input."),
|
|
@@ -79,7 +79,7 @@ ZH_TRANSLATIONS: Dict[str, str] = {
|
|
|
79
79
|
"List MiniMax H3 point packages.": "列出 MiniMax H3 积分套餐包。",
|
|
80
80
|
"Show the MiniMax H3 point balance.": "查看 MiniMax H3 积分余额。",
|
|
81
81
|
"Cancel an unfinished MiniMax H3 video task.": "取消尚未结束的 MiniMax H3 视频任务。",
|
|
82
|
-
"Video prompt; at most
|
|
82
|
+
"Video prompt; at most 7000 characters.": "视频提示词,最多 7000 个字符。",
|
|
83
83
|
"Output resolution: 768P, 1080P, or 2K.": "输出分辨率:768P、1080P 或 2K。",
|
|
84
84
|
"Video duration in seconds (4-15).": "视频时长秒数(4–15)。",
|
|
85
85
|
"Output ratio or adaptive for media input.": "输出宽高比;素材输入可使用 adaptive。",
|
|
@@ -109,7 +109,7 @@ ZH_TRANSLATIONS: Dict[str, str] = {
|
|
|
109
109
|
"MiniMax H3 API returned an invalid response.": "MiniMax H3 API 返回了无效响应。",
|
|
110
110
|
"MiniMax H3 API rejected the request.": "MiniMax H3 API 拒绝了请求。",
|
|
111
111
|
"Prompt cannot be empty.": "提示词不能为空。",
|
|
112
|
-
"Prompt cannot exceed
|
|
112
|
+
"Prompt cannot exceed 7000 characters.": "提示词不能超过 7000 个字符。",
|
|
113
113
|
"--last-frame requires --first-frame.": "--last-frame 需要同时指定 --first-frame。",
|
|
114
114
|
"Frame inputs cannot be combined with reference inputs.": (
|
|
115
115
|
"首尾帧素材不能与参考图片、视频或音频混用。"
|
|
@@ -7,6 +7,7 @@ from typer.testing import CliRunner
|
|
|
7
7
|
|
|
8
8
|
from compshare_cli import cli
|
|
9
9
|
from compshare_cli.commands import minimax
|
|
10
|
+
from compshare_cli.errors import UsageError
|
|
10
11
|
|
|
11
12
|
runner = CliRunner()
|
|
12
13
|
|
|
@@ -98,6 +99,15 @@ def test_create_posts_content_with_auth_and_idempotency(monkeypatch) -> None:
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
|
|
102
|
+
def test_prompt_length_boundary() -> None:
|
|
103
|
+
prompt = "a" * 7000
|
|
104
|
+
assert minimax._content(prompt, None, None, [], [], []) == [
|
|
105
|
+
{"type": "text", "text": prompt}
|
|
106
|
+
]
|
|
107
|
+
with pytest.raises(UsageError, match="7000"):
|
|
108
|
+
minimax._content(f"{prompt}a", None, None, [], [], [])
|
|
109
|
+
|
|
110
|
+
|
|
101
111
|
def test_create_dry_run_needs_no_key_and_does_not_call_api(monkeypatch) -> None:
|
|
102
112
|
monkeypatch.delenv("COMPSHARE_MINIMAX_API_KEY")
|
|
103
113
|
monkeypatch.setenv("COMPSHARE_MINIMAX_CALLBACK_TOKEN", "callback-secret")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|