Aller directement au contenu principal

openhands.runtime.browser.browser_env

BrowserEnv Objects

class BrowserEnv()

step

def step(action_str: str, timeout: float = 30) -> dict

Execute an action in the browser environment and return the observation.

image_to_png_base64_url

@staticmethod
def image_to_png_base64_url(image: np.ndarray | Image.Image,
add_data_prefix: bool = False)

Convert a numpy array to a base64 encoded png image url.

image_to_jpg_base64_url

@staticmethod
def image_to_jpg_base64_url(image: np.ndarray | Image.Image,
add_data_prefix: bool = False)

Convert a numpy array to a base64 encoded jpeg image url.