env_client module

class env_client.EnvironmentClient(reset_endpoint_url: str, step_endpoint_url: str, request_params: QueryParams | Mapping[str, str | int | float | bool | None | Sequence[str | int | float | bool | None]] | List[Tuple[str, str | int | float | bool | None]] | Tuple[Tuple[str, str | int | float | bool | None], ...] | str | bytes | None = None, request_headers: Headers | Mapping[str, str] | Mapping[bytes, bytes] | Sequence[Tuple[str, str]] | Sequence[Tuple[bytes, bytes]] | None = None, request_timeout: float | None = None)[source]

Bases: Environment[TEnvState], ABC

async reset() tuple[list[Message], list[Tool]][source]

Reset the environment and collect initial observation(s).

Possible observations could be instructions on how tools are related, or the goal of the environment.

Returns:

Two-tuple of initial observations and tools.

async step(action: ToolRequestMessage) tuple[list[Message], float, bool, bool][source]

Take a step in the environment.

Parameters:

action – Action to take.

Returns:

Four-tuple of new observations, instantaneous reward for this action, a flag

symbolizing if the episode is done, and a flag symbolizing if the episode was truncated (e.g. via early stopping).