Skip to main content

Python Protocol

class Environment(Protocol):
    def reset(self, goal: str) -> str: ...

    def step(self, action: str) -> (
        tuple[str, bool, bool] | Awaitable[tuple[str, bool, bool]]
    ): ...
Step return tuple is:
  • observation
  • done
  • success