Skip to main content

MultiStepEnv

A multi-step environment for reinforcement learning with LLMs.

init

Initialize the environment. Parameters:
  • extractor: Extractor to process LLM responses.
  • max_steps: Maximum steps per episode. **kwargs: Additional environment parameters.

_get_initial_state

_get_next_observation

_get_terminal_observation

is_done

Returns: bool: A boolean flag.

_is_done

metadata

Returns: Dict[str, Any]: A copy of the environment’s metadata.

current_step

Returns: int: The number of the step we are currently in.