OpenDevin icon indicating copy to clipboard operation
OpenDevin copied to clipboard

Improve serialization and deserialization of Actions and Observations

Open rbren opened this issue 3 months ago • 0 comments

https://github.com/OpenDevin/OpenDevin/pull/105 introduced a new abstraction for agents.

We now keep a history of (Action, Observation) pairs. Agents are expected to produce an Action at each step, and the Action produces an Observation. Specific actions and observations all have their own subclasses.

Currently we use a lot of isinstance to convert between these classes and dict representations of them. We'll need something more robust.

See this search for places to improve: https://github.com/search?q=repo%3AOpenDevin%2FOpenDevin%20isinstance&type=code

There is currently a to_dict method on Actions (and Observations?) that can probably be used here.

rbren avatar Mar 25 '24 19:03 rbren