Spaces:
Running
Running
PROTHAM
Implement strict judge feedback: ambiguous task descriptions, server-side payload clues, increased exploration steps
431d2c4 Download models.py from ProthamD/api-debug-env: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/spaces/ProthamD/api-debug-env/resolve/4898dbf072ed5b8ea46fdc75291de2169497b4e6/models.py
- Command line
-
hf download hf://spaces/ProthamD/api-debug-env@4898dbf072ed5b8ea46fdc75291de2169497b4e6/models.py
-
curl -L -o models.py https://huggingface.co/spaces/ProthamD/api-debug-env/resolve/4898dbf072ed5b8ea46fdc75291de2169497b4e6/models.py
1.27 kB
| from __future__ import annotations | |
| try: | |
| from openenv.core.env_server.types import Action, Observation, State | |
| except ImportError: | |
| try: | |
| from openenv.core.models import Action, Observation, State | |
| except ImportError: | |
| from openenv.core.env_server import Action, Observation, State | |
| from pydantic import Field | |
| class APIAction(Action): | |
| method: str = Field(default="GET") | |
| url: str = Field(default="/mock_api/users") | |
| headers: dict = Field(default_factory=dict) | |
| body: dict = Field(default_factory=dict) | |
| query_params: dict = Field(default_factory=dict) | |
| class APIObservation(Observation): | |
| task_id: str = Field(default="easy") | |
| task_description: str = Field(default="") | |
| broken_request: dict = Field(default_factory=dict) | |
| last_status_code: int = Field(default=0) | |
| last_response_headers: dict = Field(default_factory=dict) | |
| last_response_body: str = Field(default="") | |
| step_feedback: str = Field(default="") | |
| current_score: float = Field(default=0.0) | |
| attempt: int = Field(default=0) | |
| reward: float = Field(default=0.0) | |
| done: bool = Field(default=False) | |
| class APIState(State): | |
| task_id: str = Field(default="easy") | |
| max_steps: int = Field(default=10) | |
| solved: bool = Field(default=False) | |