|
1 | 1 | <a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts"></a> |
2 | 2 |
|
| 3 | +<a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.SheetCell"></a> |
| 4 | + |
| 5 | +## SheetCell |
| 6 | + |
| 7 | +```python |
| 8 | +class SheetCell(TypedDict): |
| 9 | +``` |
| 10 | + |
| 11 | +Type definition for a sheet cell input. |
| 12 | + |
3 | 13 | <a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit"></a> |
4 | 14 |
|
5 | 15 | ## HybridBrowserToolkit |
@@ -29,7 +39,6 @@ Initialize the HybridBrowserToolkit. |
29 | 39 | - **headless** (bool): Whether to run browser in headless mode. Defaults to True. |
30 | 40 | - **user_data_dir** (Optional[str]): Directory for user data persistence. Defaults to None. |
31 | 41 | - **stealth** (bool): Whether to enable stealth mode. Defaults to False. |
32 | | -- **web_agent_model** (Optional[BaseModelBackend]): Model for web agent operations. Defaults to None. |
33 | 42 | - **cache_dir** (str): Directory for caching. Defaults to "tmp/". (default: `"tmp/"`) |
34 | 43 | - **enabled_tools** (Optional[List[str]]): List of enabled tools. Defaults to None. |
35 | 44 | - **browser_log_to_file** (bool): Whether to log browser actions to file. Defaults to False. |
@@ -59,35 +68,37 @@ def __del__(self): |
59 | 68 |
|
60 | 69 | Cleanup browser resources on garbage collection. |
61 | 70 |
|
62 | | -<a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit.web_agent_model"></a> |
| 71 | +<a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit.cache_dir"></a> |
63 | 72 |
|
64 | | -### web_agent_model |
| 73 | +### cache_dir |
65 | 74 |
|
66 | 75 | ```python |
67 | | -def web_agent_model(self): |
| 76 | +def cache_dir(self): |
68 | 77 | ``` |
69 | 78 |
|
70 | | -Get the web agent model. |
| 79 | +Get the cache directory. |
71 | 80 |
|
72 | | -<a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit.web_agent_model"></a> |
| 81 | +<a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit._trim_sheet_content"></a> |
73 | 82 |
|
74 | | -### web_agent_model |
| 83 | +### _trim_sheet_content |
75 | 84 |
|
76 | 85 | ```python |
77 | | -def web_agent_model(self, value: Optional[BaseModelBackend]): |
| 86 | +def _trim_sheet_content(self, content: str): |
78 | 87 | ``` |
79 | 88 |
|
80 | | -Set the web agent model. |
| 89 | +Trim sheet content and add row/column labels. |
81 | 90 |
|
82 | | -<a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit.cache_dir"></a> |
| 91 | +Remove all empty rows and columns, then add: |
| 92 | +- Column headers: A, B, C, D... |
| 93 | +- Row numbers: 0, 1, 2, 3... |
83 | 94 |
|
84 | | -### cache_dir |
| 95 | +**Parameters:** |
85 | 96 |
|
86 | | -```python |
87 | | -def cache_dir(self): |
88 | | -``` |
| 97 | +- **content** (str): Raw sheet content with tabs and newlines. |
89 | 98 |
|
90 | | -Get the cache directory. |
| 99 | +**Returns:** |
| 100 | + |
| 101 | + str: Trimmed content with row/column labels. |
91 | 102 |
|
92 | 103 | <a id="camel.toolkits.hybrid_browser_toolkit.hybrid_browser_toolkit_ts.HybridBrowserToolkit.clone_for_new_session"></a> |
93 | 104 |
|
|
0 commit comments