trading_agent.tools.browser_type_tool
¶
The browser_type tool: types into a numbered field from the latest snapshot.
Typical usage example:
tool = BrowserTypeTool(session)
BrowserTypeArguments
¶
Bases: BaseModel
The arguments of browser_type.
Attributes:
| Name | Type | Description |
|---|---|---|
element |
int
|
The field's number from the latest snapshot. |
text |
str
|
What to type; it replaces what the field holds. |
submit |
bool
|
Whether to press Enter afterwards, for example to run a search. |
BrowserTypeTool
¶
Bases: BrowserTool
Types into a field.
Source code in src/trading_agent/tools/browser_tool.py
run
async
¶
Types the text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
BrowserTypeArguments
|
The field, the text and whether to submit. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
The new snapshot, or an error. |