Spaces:
Running
Running
Download models.py from openenv/dipg_safety_env: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/spaces/openenv/dipg_safety_env/resolve/main/models.py
- Command line
-
hf download hf://spaces/openenv/dipg_safety_env/models.py
-
curl -L -o models.py https://huggingface.co/spaces/openenv/dipg_safety_env/resolve/main/models.py
769 Bytes
| # envs/dipg_safety_env/models.py | |
| from typing import Any, Dict | |
| from openenv.core.env_server import Action, Observation, State | |
| from pydantic import Field | |
| class DIPGAction(Action): | |
| """The action taken by the agent, which is its generated response.""" | |
| llm_response: str | |
| class DIPGObservation(Observation): | |
| """The observation given to the agent: a context and a question.""" | |
| context: str = "" | |
| question: str = "" | |
| class DIPGState(State): | |
| """The internal state of the environment for tracking the current challenge.""" | |
| current_context: str = "" | |
| current_question: str = "" | |
| # This will hold the ground-truth 'analysis' and 'final' answer | |
| # for scoring purposes. | |
| expected_answer: Dict[str, Any] = Field(default_factory=dict) | |