Spaces:
Sleeping
Sleeping
Download server/models.py from darshsingh1/sql-debug-env: direct link, hf CLI and curl.
- Browser
- Download file 973 Bytes
-
https://huggingface.co/spaces/darshsingh1/sql-debug-env/resolve/main/server/models.py
- Command line
-
hf download hf://spaces/darshsingh1/sql-debug-env/server/models.py
-
curl -L -o models.py https://huggingface.co/spaces/darshsingh1/sql-debug-env/resolve/main/server/models.py
973 Bytes
| """ | |
| Pydantic models for the OpenENV SQL Debugging environment. | |
| """ | |
| from typing import Optional | |
| from pydantic import BaseModel | |
| class SQLAction(BaseModel): | |
| """Action submitted by the agent — a SQL query string.""" | |
| query: str | |
| class SQLObservation(BaseModel): | |
| """Observation returned by the environment after reset or step.""" | |
| schema_str: str # Table definitions (CREATE TABLE statements) | |
| task_description: str # Natural language description of what the query should do | |
| broken_query: str # The buggy starting query (provided at reset, unchanged) | |
| last_error: Optional[str] = None # Execution error from last action, or None | |
| last_output: Optional[str] = None # Stringified output of last query, or None | |
| step_number: int = 0 | |
| class StepResult(BaseModel): | |
| """Result returned after each step.""" | |
| observation: SQLObservation | |
| reward: float # Per-step reward in [0.0, 1.0] | |
| done: bool | |
| info: dict | |