Spaces:
Sleeping
Sleeping
Download environment/models.py from CodeReview/codereview-env: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/spaces/CodeReview/codereview-env/resolve/a089c46d3dd2a383fa6926892eec0dfacdc2432d/environment/models.py
- Command line
-
hf download hf://spaces/CodeReview/codereview-env@a089c46d3dd2a383fa6926892eec0dfacdc2432d/environment/models.py
-
curl -L -o models.py https://huggingface.co/spaces/CodeReview/codereview-env/resolve/a089c46d3dd2a383fa6926892eec0dfacdc2432d/environment/models.py
554 Bytes
| from pydantic import BaseModel, Field | |
| from typing import List, Literal, Optional | |
| class Issue(BaseModel): | |
| line: int = Field(..., ge=1) | |
| category: Literal["bug", "style", "security", "performance", "documentation"] | |
| description: str = Field(..., max_length=200) | |
| class Action(BaseModel): | |
| issues: List[Issue] = Field(default_factory=list) | |
| final: bool = False | |
| class Observation(BaseModel): | |
| code: str | |
| step_count: int | |
| previous_feedback: str = "" | |
| done: bool = False | |
| class Reward(BaseModel): | |
| value: float | |
| reason: str | |