Spaces:
Sleeping
Sleeping
Download models.py from sharancreates/openenv_hackathon: direct link, hf CLI and curl.
- Browser
- Download file 795 Bytes
-
https://huggingface.co/spaces/sharancreates/openenv_hackathon/resolve/main/models.py
- Command line
-
hf download hf://spaces/sharancreates/openenv_hackathon/models.py
-
curl -L -o models.py https://huggingface.co/spaces/sharancreates/openenv_hackathon/resolve/main/models.py
795 Bytes
| from pydantic import BaseModel, Field | |
| from typing import Optional, List | |
| class Action(BaseModel): | |
| # The agent chooses what to do | |
| action_type: str = Field(..., description="Values: 'comment', 'apply_fix', or 'submit'") | |
| line_number: Optional[int] = Field(None, description="The line number to act upon") | |
| content: str = Field(..., description="The text of the comment or the code to replace") | |
| class Observation(BaseModel): | |
| # What the agent 'sees' every turn | |
| file_name: str | |
| code_content: str | |
| diff: str | |
| linter_report: List[str] | |
| current_task: str | |
| class Reward(BaseModel): | |
| # The score given back to the agent | |
| value: float = Field(..., gt=-0.1, lt=1.1) | |
| comment: str | |
| class State(BaseModel): | |
| current_task_id: str | |
| step_count: int | |
| code: str |