Spaces:
Sleeping
Sleeping
File size: 1,037 Bytes
f527210 | 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 | # 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 Agterm Environment.
The agterm environment is a terminal environment that executes code in a terminal.
"""
from dataclasses import dataclass
from openenv_core.env_server.types import Action, Observation, State
@dataclass(kw_only=True)
class agtermAction(Action):
"""Action for the Agterm environment - command to send to the environment"""
message: str
@dataclass(kw_only=True)
class agtermObservation(Observation):
"""Observation from the Agterm environment - result from the environment"""
result: str
done: bool
reward: float
@dataclass(kw_only=True)
class agtermState(State):
"""State of the Agterm environment - current state of the environment"""
last_message: str = ""
last_result: str = ""
total_messages: int = 0
history: list[str] = None
|