burtenshaw's picture
burtenshaw HF Staff
Publish procedural SQL investigation tasks and reproducible environment source
2ce79be verified
Raw History Blame Contribute Delete
768 Bytes
from typing import Literal
from openenv.core.env_server.types import Action, Observation
from pydantic import Field
class SQLAction(Action):
op: Literal["query", "submit", "finish"] = Field(
description="query explores the database; submit executes your final answer SQL and ends with a correctness reward; finish ends with reward zero."
)
sql: str = Field(
default="",
max_length=8000,
description="One read-only SQLite SELECT/WITH statement. Required for query and submit; ignored by finish.",
)
class SQLObservation(Observation):
message: str = ""
columns: list[str] = Field(default_factory=list)
rows: list[list[str | int | float | None]] = Field(default_factory=list)
remaining_steps: int = 12