CoolFace
Apppublic

rishil2005/github-issue-triage-env

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
models.py27 linesDownload Raw Back to RL
1from __future__ import annotations
2
3from typing import Literal, Optional
4
5from pydantic import BaseModel, Field
6
7
8class IssueObservation(BaseModel):
9    issue_id: int = Field(..., description="Unique identifier for the issue.")
10    title: str = Field(..., description="Issue title.")
11    body: str = Field(..., description="Issue body.")
12
13
14class AgentAction(BaseModel):
15    action_type: Literal["AddLabel", "RequestMoreInfo"] = Field(
16        ...,
17        description="Triage action type.",
18    )
19    label: Optional[str] = Field(
20        default=None,
21        description="Label for AddLabel action (bug|enhancement).",
22    )
23    comment: Optional[str] = Field(
24        default=None,
25        description="Optional comment text.",
26    )
27