Spaces:
Paused
Paused
Selcan Yukcu
commited on
Commit
·
1f83564
1
Parent(s):
6a1e814
feat: Refactor BugLocalizationRequest model to use Pydantic Fields with descriptions and optional types
Browse files- utils/model.py +13 -4
utils/model.py
CHANGED
|
@@ -1,8 +1,17 @@
|
|
| 1 |
-
from pydantic import BaseModel
|
| 2 |
from typing import Optional
|
| 3 |
|
| 4 |
# TODO: Add Field and descriptions
|
| 5 |
class BugLocalizationRequest(BaseModel):
|
| 6 |
-
issue_key
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseModel, Field
|
| 2 |
from typing import Optional
|
| 3 |
|
| 4 |
# TODO: Add Field and descriptions
|
| 5 |
class BugLocalizationRequest(BaseModel):
|
| 6 |
+
issue_key: Optional[str] = Field(
|
| 7 |
+
default="",
|
| 8 |
+
description="The unique identifier for the issue or bug ticket (e.g., JIRA key). "
|
| 9 |
+
)
|
| 10 |
+
summary: Optional[str] = Field(
|
| 11 |
+
default=None,
|
| 12 |
+
description="The short title or summary of the bug."
|
| 13 |
+
)
|
| 14 |
+
description: str = Field(
|
| 15 |
+
...,
|
| 16 |
+
description="A detailed description of the bug."
|
| 17 |
+
)
|