Spaces:
Running
Running
File size: 554 Bytes
6e7ce30 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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
|