sference-cli 0.0.4__tar.gz → 0.0.6__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.
- {sference_cli-0.0.4 → sference_cli-0.0.6}/PKG-INFO +2 -2
- {sference_cli-0.0.4 → sference_cli-0.0.6}/pyproject.toml +2 -2
- sference_cli-0.0.6/sference_cli/__init__.py +14 -0
- {sference_cli-0.0.4 → sference_cli-0.0.6}/sference_cli/main.py +22 -1
- sference_cli-0.0.4/sference_cli/__init__.py +0 -1
- {sference_cli-0.0.4 → sference_cli-0.0.6}/.gitignore +0 -0
- {sference_cli-0.0.4 → sference_cli-0.0.6}/README.md +0 -0
- {sference_cli-0.0.4 → sference_cli-0.0.6}/sference_cli/stream_cache.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sference-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: sference command-line interface
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
|
-
Requires-Dist: sference-sdk>=0.0.
|
|
6
|
+
Requires-Dist: sference-sdk>=0.0.6
|
|
7
7
|
Requires-Dist: typer>=0.24.1
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sference-cli"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.6"
|
|
4
4
|
description = "sference command-line interface"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"typer>=0.24.1",
|
|
9
|
-
"sference-sdk>=0.0.
|
|
9
|
+
"sference-sdk>=0.0.6",
|
|
10
10
|
]
|
|
11
11
|
|
|
12
12
|
[project.scripts]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from importlib.metadata import PackageNotFoundError, version as _distribution_version
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def _package_version(distribution_name: str) -> str:
|
|
5
|
+
"""Installed distribution version (matches ``pyproject.toml`` / release tag)."""
|
|
6
|
+
try:
|
|
7
|
+
return _distribution_version(distribution_name)
|
|
8
|
+
except PackageNotFoundError:
|
|
9
|
+
return "0.0.0-dev"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
__version__ = _package_version("sference-cli")
|
|
13
|
+
|
|
14
|
+
__all__ = ["__version__"]
|
|
@@ -12,7 +12,10 @@ from typing import Any, Optional, TypeVar
|
|
|
12
12
|
|
|
13
13
|
import typer
|
|
14
14
|
|
|
15
|
+
import sference_sdk
|
|
15
16
|
from sference_sdk import ApiError, SferenceClient
|
|
17
|
+
|
|
18
|
+
from sference_cli import __version__ as _CLI_VERSION
|
|
16
19
|
from sference_sdk.checkpoint import clear_checkpoint, load_checkpoint, save_checkpoint
|
|
17
20
|
|
|
18
21
|
from . import stream_cache as stream_cache_mod
|
|
@@ -165,8 +168,20 @@ def _stream_window_only(value: str) -> str:
|
|
|
165
168
|
|
|
166
169
|
|
|
167
170
|
@app.callback()
|
|
168
|
-
def _root(
|
|
171
|
+
def _root(
|
|
172
|
+
ctx: typer.Context,
|
|
173
|
+
version: bool = typer.Option(
|
|
174
|
+
False,
|
|
175
|
+
"--version",
|
|
176
|
+
"-V",
|
|
177
|
+
help="Print version (from package metadata; same as the release tag on PyPI).",
|
|
178
|
+
is_eager=True,
|
|
179
|
+
),
|
|
180
|
+
) -> None:
|
|
169
181
|
"""Print help when invoked without a command."""
|
|
182
|
+
if version:
|
|
183
|
+
typer.echo(f"sference-cli {_CLI_VERSION} (sference-sdk {sference_sdk.__version__})")
|
|
184
|
+
raise typer.Exit(code=0)
|
|
170
185
|
if ctx.invoked_subcommand is None:
|
|
171
186
|
typer.echo(ctx.get_help())
|
|
172
187
|
raise typer.Exit(code=0)
|
|
@@ -300,6 +315,11 @@ def responses_create(
|
|
|
300
315
|
"--include-reasoning/--no-include-reasoning",
|
|
301
316
|
help="Include extracted reasoning in the response output (default: true).",
|
|
302
317
|
),
|
|
318
|
+
enable_thinking: bool | None = typer.Option(
|
|
319
|
+
None,
|
|
320
|
+
"--enable-thinking/--disable-thinking",
|
|
321
|
+
help="Qwen3: forward to tokenizer apply_chat_template. Omit for tokenizer default.",
|
|
322
|
+
),
|
|
303
323
|
wait: bool = typer.Option(False, "--wait/--no-wait"),
|
|
304
324
|
poll_ms: int = typer.Option(500, "--poll-ms", help="Polling interval when --wait is enabled."),
|
|
305
325
|
timeout_s: int = typer.Option(60, "--timeout-s", help="Timeout in seconds when --wait is enabled."),
|
|
@@ -312,6 +332,7 @@ def responses_create(
|
|
|
312
332
|
model=model,
|
|
313
333
|
input=[{"role": "user", "content": content}],
|
|
314
334
|
include_reasoning=include_reasoning,
|
|
335
|
+
enable_thinking=enable_thinking,
|
|
315
336
|
)
|
|
316
337
|
)
|
|
317
338
|
if wait:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__all__ = []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|