Spaces:
Runtime error
Runtime error
Download schemas/request.py from uvpatel7271/python-code-review-env: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/spaces/uvpatel7271/python-code-review-env/resolve/main/schemas/request.py
- Command line
-
hf download hf://spaces/uvpatel7271/python-code-review-env/schemas/request.py
-
curl -L -o request.py https://huggingface.co/spaces/uvpatel7271/python-code-review-env/resolve/main/schemas/request.py
775 Bytes
| """Request schemas for code analysis endpoints and UI.""" | |
| from __future__ import annotations | |
| from typing import Literal | |
| from pydantic import BaseModel, Field | |
| DomainHint = Literal["auto", "dsa", "data_science", "ml_dl", "web"] | |
| class AnalyzeCodeRequest(BaseModel): | |
| """Validated input payload for multi-domain code analysis.""" | |
| code: str = Field(..., min_length=1, description="Source code to analyze.") | |
| context_window: str = Field(default="", max_length=2000, description="Optional repository or task context.") | |
| traceback_text: str = Field(default="", max_length=2000, description="Optional runtime or test failure output.") | |
| domain_hint: DomainHint = Field(default="auto", description="Optional domain override when auto detection is not desired.") | |