Spaces:
Runtime error
Runtime error
Download models.py from Zaidoppa/RepoReviewer: direct link, hf CLI and curl.
- Browser
- Download file 821 Bytes
-
https://huggingface.co/spaces/Zaidoppa/RepoReviewer/resolve/main/models.py
- Command line
-
hf download hf://spaces/Zaidoppa/RepoReviewer/models.py
-
curl -L -o models.py https://huggingface.co/spaces/Zaidoppa/RepoReviewer/resolve/main/models.py
821 Bytes
| from pydantic import BaseModel, Field | |
| from typing import Optional, List, Literal | |
| class PullRequest(BaseModel): | |
| title: str | |
| author: str | |
| description: str | |
| files_changed: List[str] | |
| class Observation(BaseModel): | |
| current_pr: PullRequest | |
| repo_rules: List[str] | |
| terminal_output: str = Field(description="Output from previous actions") | |
| ActionType = Literal[ | |
| 'view_diff', | |
| 'run_linter', | |
| 'run_tests', | |
| 'request_changes', | |
| 'approve_pr', | |
| 'reject_pr' | |
| ] | |
| class Action(BaseModel): | |
| action_type: ActionType | |
| target_file: Optional[str] = Field(None, description="Required for view_diff") | |
| line_number: Optional[int] = Field(None, description="Required for request_changes") | |
| comment: Optional[str] = Field(None, description="Required for request_changes or reject_pr") |