Spaces:
Sleeping
Sleeping
Download models.py from at0day/GitReviewerPro: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/spaces/at0day/GitReviewerPro/resolve/main/models.py
- Command line
-
hf download hf://spaces/at0day/GitReviewerPro/models.py
-
curl -L -o models.py https://huggingface.co/spaces/at0day/GitReviewerPro/resolve/main/models.py
1.44 kB
| """ | |
| Data models for the Git Commit Reviewer Environment. | |
| """ | |
| from typing import List, Optional | |
| from openenv.core.env_server.types import Action, Observation | |
| from pydantic import Field | |
| class GitCommitReviewerAction(Action): | |
| """Action for the Git Commit Reviewer environment.""" | |
| score: float = Field(..., description="Quality score from 0.0 to 1.0") | |
| type_valid: bool = Field(..., description="Does it follow Conventional Commits type rules?") | |
| summary_length: int = Field(..., description="Length of the summary line") | |
| issues: List[str] = Field(..., description="List of specific problems identified") | |
| suggestion: str = Field(..., description="Rewritten commit message") | |
| session_id: Optional[str] = Field(default=None, description="Active session ID for state recovery") | |
| class GitCommitReviewerObservation(Observation): | |
| """Observation from the Git Commit Reviewer environment.""" | |
| commit_message: str = Field(default="", description="The git commit message to review") | |
| commit_idx: int = Field(default=0, description="Current commit index") | |
| total_commits: int = Field(default=0, description="Total commits in this task") | |
| done: bool = Field(default=False, description="Is the task complete?") | |
| reward: float = Field(default=0.0, description="Reward from the latest action") | |
| session_id: Optional[str] = Field(default=None, description="Current session ID") | |