Spaces:
Sleeping
Sleeping
Fix Pydantic v2 MRO conflict in SupportObservation/Action/State - 24/24 tests pass
Browse files
models.py
CHANGED
|
@@ -20,7 +20,7 @@ from openenv.core.env_server.types import Action, Observation, State
|
|
| 20 |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 21 |
|
| 22 |
if _USE_PYDANTIC:
|
| 23 |
-
class SupportAction(
|
| 24 |
model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid")
|
| 25 |
metadata: Dict[str, Any] = {}
|
| 26 |
action_type: Literal["classify", "reply", "escalate", "close"]
|
|
@@ -56,7 +56,7 @@ else:
|
|
| 56 |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 57 |
|
| 58 |
if _USE_PYDANTIC:
|
| 59 |
-
class SupportObservation(
|
| 60 |
model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid")
|
| 61 |
done: bool = False
|
| 62 |
reward: Optional[float] = None
|
|
@@ -90,7 +90,7 @@ else:
|
|
| 90 |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 91 |
|
| 92 |
if _USE_PYDANTIC:
|
| 93 |
-
class SupportState(
|
| 94 |
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
| 95 |
episode_id: Optional[str] = None
|
| 96 |
step_count: int = 0
|
|
|
|
| 20 |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 21 |
|
| 22 |
if _USE_PYDANTIC:
|
| 23 |
+
class SupportAction(BaseModel): # type: ignore[misc]
|
| 24 |
model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid")
|
| 25 |
metadata: Dict[str, Any] = {}
|
| 26 |
action_type: Literal["classify", "reply", "escalate", "close"]
|
|
|
|
| 56 |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 57 |
|
| 58 |
if _USE_PYDANTIC:
|
| 59 |
+
class SupportObservation(BaseModel): # type: ignore[misc]
|
| 60 |
model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid")
|
| 61 |
done: bool = False
|
| 62 |
reward: Optional[float] = None
|
|
|
|
| 90 |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 91 |
|
| 92 |
if _USE_PYDANTIC:
|
| 93 |
+
class SupportState(BaseModel): # type: ignore[misc]
|
| 94 |
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
| 95 |
episode_id: Optional[str] = None
|
| 96 |
step_count: int = 0
|