Spaces:
Sleeping
Sleeping
Commit ·
23ec28c
1
Parent(s): 8483903
fix: replace deprecated Pydantic class Config with model_config = ConfigDict()
Browse files
model.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# model.py
|
| 2 |
from typing import List, Optional, Dict, Any
|
| 3 |
-
from pydantic import BaseModel, Field
|
| 4 |
from openenv.core.env_server import Action, Observation
|
| 5 |
from openenv.core.env_server.types import State
|
| 6 |
|
|
@@ -18,8 +18,7 @@ class BugReport(BaseModel):
|
|
| 18 |
stack_trace: str = ""
|
| 19 |
affected_component: str = ""
|
| 20 |
|
| 21 |
-
|
| 22 |
-
arbitrary_types_allowed = True
|
| 23 |
|
| 24 |
|
| 25 |
class TriageAction(Action):
|
|
@@ -33,8 +32,7 @@ class TriageAction(Action):
|
|
| 33 |
milestone: str = "backlog"
|
| 34 |
reasoning: str = ""
|
| 35 |
|
| 36 |
-
|
| 37 |
-
arbitrary_types_allowed = True
|
| 38 |
|
| 39 |
|
| 40 |
class TriageObservation(Observation):
|
|
@@ -54,8 +52,7 @@ class TriageObservation(Observation):
|
|
| 54 |
steps_taken: int = 0
|
| 55 |
max_steps: int = 6
|
| 56 |
|
| 57 |
-
|
| 58 |
-
arbitrary_types_allowed = True
|
| 59 |
|
| 60 |
|
| 61 |
class TriageState(State):
|
|
@@ -68,5 +65,4 @@ class TriageState(State):
|
|
| 68 |
tasks_completed: List[str] = Field(default_factory=list)
|
| 69 |
actions_taken: List[str] = Field(default_factory=list)
|
| 70 |
|
| 71 |
-
|
| 72 |
-
arbitrary_types_allowed = True
|
|
|
|
| 1 |
# model.py
|
| 2 |
from typing import List, Optional, Dict, Any
|
| 3 |
+
from pydantic import BaseModel, Field, ConfigDict
|
| 4 |
from openenv.core.env_server import Action, Observation
|
| 5 |
from openenv.core.env_server.types import State
|
| 6 |
|
|
|
|
| 18 |
stack_trace: str = ""
|
| 19 |
affected_component: str = ""
|
| 20 |
|
| 21 |
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
class TriageAction(Action):
|
|
|
|
| 32 |
milestone: str = "backlog"
|
| 33 |
reasoning: str = ""
|
| 34 |
|
| 35 |
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
class TriageObservation(Observation):
|
|
|
|
| 52 |
steps_taken: int = 0
|
| 53 |
max_steps: int = 6
|
| 54 |
|
| 55 |
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
class TriageState(State):
|
|
|
|
| 65 |
tasks_completed: List[str] = Field(default_factory=list)
|
| 66 |
actions_taken: List[str] = Field(default_factory=list)
|
| 67 |
|
| 68 |
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
|