Spaces:
Sleeping
Sleeping
Download build/lib/coding_env/models.py from wukaixingxp/coding-env-test: direct link, hf CLI and curl.
- Browser
- Download file 706 Bytes
-
https://huggingface.co/spaces/wukaixingxp/coding-env-test/resolve/refs%2Fpr%2F1/build/lib/coding_env/models.py
- Command line
-
hf download hf://spaces/wukaixingxp/coding-env-test@refs/pr/1/build/lib/coding_env/models.py
-
curl -L -o models.py https://huggingface.co/spaces/wukaixingxp/coding-env-test/resolve/refs%2Fpr%2F1/build/lib/coding_env/models.py
706 Bytes
| """ | |
| envs/coding_env/models.py | |
| -------------------------------- | |
| Action/Observation types for the Coding environment. | |
| """ | |
| from __future__ import annotations | |
| from openenv.core.env_server.types import Action, Observation, State | |
| class CodeAction(Action): | |
| """ | |
| Represents a single code execution request. | |
| """ | |
| code: str | |
| # Optional: future fields like 'lint': bool, 'timeout_s': float, etc. | |
| class CodeObservation(Observation): | |
| """ | |
| Result of executing code in the environment. | |
| """ | |
| stdout: str = "" | |
| stderr: str = "" | |
| exit_code: int = 0 | |
| class CodeState(State): | |
| """State for CodeAct environment with persistent execution context.""" | |
| last_exit_code: int = 0 | |