WalkXR-AI / schemas / emotional_state.py
emotional_state.py
Raw
from pydantic import BaseModel, Field
from typing import Optional, Literal

class BasicEmotionalState(BaseModel):
    emotion: Literal[
        "neutral", "curious", "awkward", "angry", "happy",
        "sad", "confused", "afraid", "ashamed", "hopeful"
    ] = Field(..., description="Categorical emotion label")
    intensity: float = Field(..., ge=0.0, le=1.0, description="Strength of emotion from 0.0 to 1.0")

class CircumplexEmotionalState(BaseModel):
    valence: float = Field(..., ge=-1.0, le=1.0, description="Pleasure axis")
    arousal: float = Field(..., ge=-1.0, le=1.0, description="Activation axis")
    emotion: Optional[str] = Field(None, description="Derived emotion label (optional)")