Create intent_models.py
Browse files- app/models/intent_models.py +14 -0
app/models/intent_models.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Literal
|
| 2 |
+
from pydantic import BaseModel, Field
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class IntentSimulation(BaseModel):
|
| 6 |
+
action: Literal[
|
| 7 |
+
"restart_service", "scale_out", "rollback", "alert_team"
|
| 8 |
+
] = Field(..., description="Proposed action")
|
| 9 |
+
target: str = Field(..., description="Target component")
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class IntentSimulationResponse(BaseModel):
|
| 13 |
+
risk_score: float
|
| 14 |
+
recommendation: Literal["safe_to_execute", "requires_approval", "blocked"]
|