ScreenshotToolkit
init
- working_directory (str, optional): The directory path where notes will be stored. If not provided, it will be determined by the
CAMEL_WORKDIR
environment variable (if set). If the environment variable is not set, it defaults tocamel_working_dir
. - timeout (Optional[float]): Timeout for API requests in seconds. (default: :obj:
None
)
read_image
- image_path (str): The local file path to the image. For example: ‘screenshots/login_page.png’.
- instruction (str, optional): Specific instructions for what to look for or what to do with the image. For example: “What is the main headline on this page?” or “Find the ‘Submit’ button.”.
take_screenshot_and_read_image
- filename (str): The name for the screenshot file (e.g., “homepage.png”). The file is saved in a
screenshots
subdirectory within the working directory. Must end with.png
. (default: :obj:None
) - save_to_file (bool, optional): If
True
, saves the screenshot to a file. (default: :obj:True
) - read_image (bool, optional): If
True
, the agent will analyze the screenshot.save_to_file
must also beTrue
. (default: :obj:True
) - instruction (Optional[str], optional): A specific question or command for the agent regarding the screenshot, used only if
read_image
isTrue
. For example: “Confirm that the user is logged in.”.
read_image
is True
.