Spaces:
Sleeping
Sleeping
| from pydantic import BaseModel, Field | |
| from typing import Optional, Dict, Any | |
| class CustomerAction(BaseModel): | |
| action_type: str = Field(..., description="Must be 'speak', 'tool_call', or 'end_call'") | |
| content: str = Field(..., description="The spoken text or the name of the tool") | |
| tool_args: Dict[str, Any] = Field(default_factory=dict, description="Arguments for the tool") | |
| class CustomerObservation(BaseModel): | |
| customer_reply: Optional[str] = Field(None, description="What the customer said") | |
| tool_response: Optional[str] = Field(None, description="Result of the tool call") | |
| conversation_history: str = Field(..., description="Full transcript of the episode") | |
| done: bool = Field(False, description="Whether the episode has ended") | |
| reward: float = Field(0.0, description="Reward received for this step") | |
| metadata: Dict[str, Any] = Field(default_factory=dict) |