Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from typing import Dict, Literal, Optional | |
| from pydantic import Field | |
| from openenv.core.env_server.types import Action, Observation | |
| class PersonaAction(Action): | |
| # = one of three actions | |
| kind: Literal["show_content", "ask_question", "advance_time"] = Field( | |
| ..., description="Which action to apply" | |
| ) | |
| # = show_content | |
| topic: Optional[str] = None | |
| source: Optional[str] = None | |
| valence: Optional[Literal["positive", "neutral", "negative"]] = None | |
| # = ask_question | |
| question: Optional[str] = None | |
| # = advance_time | |
| hours: Optional[int] = None | |
| class PersonaObservation(Observation): | |
| reaction_text: str | |
| mood: float | |
| interests: Dict[str, float] | |