spawnllm 0.3.0__tar.gz → 0.3.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.
- {spawnllm-0.3.0 → spawnllm-0.3.1}/PKG-INFO +1 -1
- {spawnllm-0.3.0 → spawnllm-0.3.1}/pyproject.toml +1 -1
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/call.py +5 -1
- {spawnllm-0.3.0 → spawnllm-0.3.1}/LICENSE +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/README.md +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/__init__.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/__main__.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/backends/__init__.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/backends/base.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/backends/claude.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/backends/codex.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/backends/gemini.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/backends/registry.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/cli.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/mlx/__init__.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/mlx/codec.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/mlx/engine.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/mlx/fuse.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/mlx/patches.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/proc.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/py.typed +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/structured.py +0 -0
- {spawnllm-0.3.0 → spawnllm-0.3.1}/spawnllm/types.py +0 -0
|
@@ -25,6 +25,8 @@ def call(
|
|
|
25
25
|
model: TModel = "small",
|
|
26
26
|
agent: bool = False,
|
|
27
27
|
response_model: type[BaseModel] | None = None,
|
|
28
|
+
cwd: str | None = None,
|
|
29
|
+
timeout: int = 180,
|
|
28
30
|
) -> str | BaseModel:
|
|
29
31
|
"""Run one CLI-backed LLM call and parse its response.
|
|
30
32
|
|
|
@@ -37,6 +39,8 @@ def call(
|
|
|
37
39
|
model: Abstract model tier (`small`/`medium`/`large`).
|
|
38
40
|
agent: Whether the call may use tools / agent capabilities.
|
|
39
41
|
response_model: Pydantic model for structured output, or `None` for text.
|
|
42
|
+
cwd: Working directory for the CLI process; `None` inherits the caller's.
|
|
43
|
+
timeout: Seconds to wait before the CLI process is killed.
|
|
40
44
|
|
|
41
45
|
Returns:
|
|
42
46
|
The raw text response, or a validated `response_model` instance.
|
|
@@ -46,7 +50,7 @@ def call(
|
|
|
46
50
|
schema_path = resolve_schema_path(backend, schema)
|
|
47
51
|
inv = backend.invocation(prompt, model=backend.models[model], schema_path=schema_path, agent=agent)
|
|
48
52
|
try:
|
|
49
|
-
stdout = run_cli(inv.argv, input=inv.stdin, env=os.environ | backend.env(), timeout=
|
|
53
|
+
stdout = run_cli(inv.argv, input=inv.stdin, env=os.environ | backend.env(), timeout=timeout, cwd=cwd)
|
|
50
54
|
raw = Path(inv.result_path).read_text() if inv.result_path else stdout
|
|
51
55
|
return backend.parse_response(raw, response_model)
|
|
52
56
|
finally:
|
|
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
|