|
16 | 16 | from app.tool.web_search import WebSearch |
17 | 17 |
|
18 | 18 |
|
19 | | -_BROWSER_DESCRIPTION = """ |
20 | | -Interact with a web browser for navigation, element interaction, content extraction, and tab management using these tools: |
21 | | -
|
22 | | -Navigation: |
23 | | -
|
24 | | -- 'go_to_url': Visit a specific URL |
25 | | -- 'go_back': Navigate back |
26 | | -- 'refresh': Reload the page |
27 | | -- 'web_search': Search a concise query in the current tab |
28 | | -Element Interaction: |
29 | | -
|
30 | | -- 'click_element': Click an element by index |
31 | | -- 'input_text': Enter text into a form |
32 | | -- 'scroll_down'/'scroll_up': Scroll page (optional pixels) |
33 | | -- 'scroll_to_text': Scroll to specific text |
34 | | -- 'send_keys': Send special keys (e.g., Enter, Control+O) |
35 | | -- 'get_dropdown_options': List dropdown options |
36 | | -- 'select_dropdown_option': Select a dropdown option by text |
37 | | -Content Extraction: |
38 | | -
|
39 | | -- 'extract_content': Retrieve specific page info (e.g., company names, links) |
40 | | -Tab Management: |
41 | | -
|
42 | | -- 'switch_tab': Switch to a tab |
43 | | -- 'open_tab': Open a new tab with URL |
44 | | -- 'close_tab': Close current tab |
45 | | -Utility: |
46 | | -
|
47 | | -- 'wait': Pause for specified seconds |
| 19 | +_BROWSER_DESCRIPTION = """\ |
| 20 | +A powerful browser automation tool that allows interaction with web pages through various actions. |
| 21 | +* This tool provides commands for controlling a browser session, navigating web pages, and extracting information |
| 22 | +* It maintains state across calls, keeping the browser session alive until explicitly closed |
| 23 | +* Use this when you need to browse websites, fill forms, click buttons, extract content, or perform web searches |
| 24 | +* Each action requires specific parameters as defined in the tool's dependencies |
| 25 | +
|
| 26 | +Key capabilities include: |
| 27 | +* Navigation: Go to specific URLs, go back, search the web, or refresh pages |
| 28 | +* Interaction: Click elements, input text, select from dropdowns, send keyboard commands |
| 29 | +* Scrolling: Scroll up/down by pixel amount or scroll to specific text |
| 30 | +* Content extraction: Extract and analyze content from web pages based on specific goals |
| 31 | +* Tab management: Switch between tabs, open new tabs, or close tabs |
| 32 | +
|
| 33 | +Note: When using element indices, refer to the numbered elements shown in the current browser state. |
48 | 34 | """ |
49 | 35 |
|
50 | 36 | Context = TypeVar("Context") |
|
0 commit comments