spawnllm 0.1.2__tar.gz → 0.1.3__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.1.2 → spawnllm-0.1.3}/PKG-INFO +1 -1
- {spawnllm-0.1.2 → spawnllm-0.1.3}/pyproject.toml +1 -1
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/structured.py +4 -5
- {spawnllm-0.1.2 → spawnllm-0.1.3}/LICENSE +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/README.md +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/__init__.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/__main__.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/backends/__init__.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/backends/base.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/backends/claude.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/backends/codex.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/backends/registry.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/call.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/cli.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/mlx/__init__.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/mlx/codec.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/mlx/engine.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/mlx/fuse.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/mlx/patches.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/proc.py +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/py.typed +0 -0
- {spawnllm-0.1.2 → spawnllm-0.1.3}/spawnllm/types.py +0 -0
|
@@ -55,11 +55,10 @@ def parse_structured_output[M: BaseModel](raw: str, response_model: type[M] | No
|
|
|
55
55
|
if not response_model:
|
|
56
56
|
return raw
|
|
57
57
|
data = json.loads(raw)
|
|
58
|
-
if isinstance(data, list)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return response_model.model_validate_json(raw)
|
|
58
|
+
events = data if isinstance(data, list) else [data] if isinstance(data, dict) else []
|
|
59
|
+
return extract_structured(
|
|
60
|
+
cast(list[dict[str, Any]], events), response_model
|
|
61
|
+
) or response_model.model_validate_json(raw)
|
|
63
62
|
|
|
64
63
|
|
|
65
64
|
def parse_result_envelope(stdout: bytes, *, argv: list[str], stderr: bytes) -> str:
|
|
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
|