Spaces:
Sleeping
Sleeping
File size: 1,168 Bytes
1b64cba | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | from pydantic import BaseModel, Field
from typing import List, Optional, Dict
from enum import Enum
class EmailPriority(str, Enum):
LOW = "low"
MEDIUM = "medium"
HIGH = "high"
class Email(BaseModel):
id: str
sender: str
subject: str
body: str
class HiddenEmailState(BaseModel):
email_id: str
true_intent: str # e.g., "meeting_request", "spam", "task"
urgency: EmailPriority
requires_response: bool
deadline: Optional[int] # timestep deadline
missing_information: bool # does agent need to ask clarification?
class Task(BaseModel):
id: str
description: str
completed: bool = False
deadline: Optional[int]
class CalendarEvent(BaseModel):
id: str
title: str
time: int
class EnvironmentState(BaseModel):
# Observed components
emails: List[Email]
tasks: List[Task]
calendar: List[CalendarEvent]
history: List[Dict] = Field(default_factory=list)
# Hidden components (NOT exposed to agent)
hidden_email_states: List[HiddenEmailState]
# Global timestep
timestep: int = 0
# Episode termination
done: bool = False |