MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / __init__

Method __init__

webarena/browser_env/async_envs.py:25–45  ·  view source on GitHub ↗
(
        self,
        max_page_length: int = 2048,
        headless: bool = True,
        slow_mo: int = 0,
        timeout: int = 30000,
        viewport_size: ViewportSize = {"width": 1280, "height": 720},
    )

Source from the content-addressed store, hash-verified

23 """
24
25 def __init__(
26 self,
27 max_page_length: int = 2048,
28 headless: bool = True,
29 slow_mo: int = 0,
30 timeout: int = 30000,
31 viewport_size: ViewportSize = {"width": 1280, "height": 720},
32 ):
33 self.observation_space = Box(
34 0,
35 255,
36 (viewport_size["height"], viewport_size["width"], 4),
37 np.uint8,
38 )
39 # TODO: make Space[Action] = ActionSpace
40 self.action_space = get_action_space() # type: ignore[assignment]
41 self.headless = headless
42 self.slow_mo = slow_mo
43 self.reset_finished = False
44 self.timeout = timeout
45 self.viewport_size = viewport_size
46
47 async def setup(self, config_file: Path | None = None) -> None:
48 self.context_manager = async_playwright()

Callers

nothing calls this directly

Calls 1

get_action_spaceFunction · 0.85

Tested by

no test coverage detected