# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """ Data models for the Edupilot Environment. The EduPilot environment is a simple test environment that echoes back messages. """ from openenv.core.env_server.types import Action, Observation from pydantic import BaseModel, Field class EdupilotAction(Action): """Action for the Edupilot environment - just a message to echo.""" message: str = Field(..., description="Message to echo back") class EdupilotObservation(Observation): """Observation from the Edupilot environment - the echoed message.""" echoed_message: str = Field(default="", description="The echoed message") message_length: int = Field(default=0, description="Length of the echoed message") goal: str = Field( default="Create a reminder email notification object in JSON format exactly matching the required schema and expected values", description="Goal of the agent to perform", ) last_action_error: bool = Field( default=False, description="whether there was last action error" ) reward_observations: list = Field( default=[], description="Observations for what was rewarded and by what" ) success_ratio: float = Field( default=0.0, description="Success ratio against the benchmark" ) mean_performance: float = Field( default=0.0, description="Mean performance of the agent" ) class EdupilotRewards(BaseModel): total_reward: float = Field(default=0.0, description="Total rewards collected") reward_observations: list = Field(default={}, description="Observations for what was rewarded and by what") class EdupilotMetrics(BaseModel): benchmark: float = Field( default=0.0, description="Benchmark to evaluate results against" ) current_reward: float = Field(default=0.0, description="Current total reward") success_ratio: float = Field( default=0.0, description="Success ratio against the benchmark" ) mean_performance: float = Field( default=0.0, description="Mean performance of the agent/model" )