trading_agent.tools.browser_screenshot_tool
¶
The browser_screenshot tool: shows the model a picture of the current page.
Typical usage example:
tool = BrowserScreenshotTool(session, desk_directory)
BrowserScreenshotTool
¶
Bases: BrowserTool
Takes a screenshot of the visible part of the page.
Creates the tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
BrowserSession
|
The desk's browser. |
required |
desk_directory
|
Path
|
The desk's folder, so the saved path can be shown relative to it. |
required |
Source code in src/trading_agent/tools/browser_screenshot_tool.py
run
async
¶
Takes the screenshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
NoArguments
|
No arguments. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
Where the picture was saved, with the picture attached, or an error. |