Spaces:
Sleeping
Sleeping
File size: 620 Bytes
ae44b00 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from pydantic import BaseModel
# This model defines what the AI sees (The "State")
class State(BaseModel):
cpu_usage: float # 0.0 to 100.0
active_servers: int # Count of running VMs
hourly_burn_rate: float # Cost in USD
response_latency: float # In milliseconds (ms)
incoming_load: int # Number of requests/users
# This model defines what the AI can do (The "Action")
class Action(BaseModel):
# 0: Stay (Do nothing)
# 1: Provision (Add server)
# 2: Terminate (Remove server)
# 3: Switch to Spot (Toggle cheap mode)
action_type: int |