Files
OpenHands/opendevin/state.py
Robert Brennan ce7c7eaae4 Refactor actions and observations (#1479)
* refactor actions and events

* remove type_key

* remove stream

* move import

* move import

* fix NullObs

* reorder imports

* fix lint

* fix dataclasses

* remove blank fields

* fix nullobs

* fix sidebar labels

* fix test compilation

* switch to asdict

* lint

* fix whitespace

* fix executable

* delint

* fix run

* remove NotImplementeds

* fix path prefix

* remove null files

* add debug

* add more debug info

* fix dataclass on null

* remove debug

* revert sandbox

* fix merge issues

* fix tyeps

* Update opendevin/events/action/browse.py
2024-05-02 15:44:54 +00:00

27 lines
801 B
Python

from dataclasses import dataclass, field
from typing import Dict, List, Tuple
from opendevin.events.action import (
Action,
)
from opendevin.events.observation import (
CmdOutputObservation,
Observation,
)
from opendevin.plan import Plan
@dataclass
class State:
plan: Plan
iteration: int = 0
# number of characters we have sent to and received from LLM so far for current task
num_of_chars: int = 0
background_commands_obs: List[CmdOutputObservation] = field(
default_factory=list)
history: List[Tuple[Action, Observation]] = field(default_factory=list)
updated_info: List[Tuple[Action, Observation]
] = field(default_factory=list)
inputs: Dict = field(default_factory=dict)
outputs: Dict = field(default_factory=dict)