anchorbrowser 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anchorbrowser/_streaming.py +4 -6
- anchorbrowser/_version.py +1 -1
- anchorbrowser/resources/tools.py +39 -0
- anchorbrowser/types/tool_perform_web_task_params.py +25 -0
- {anchorbrowser-0.3.2.dist-info → anchorbrowser-0.3.3.dist-info}/METADATA +1 -1
- {anchorbrowser-0.3.2.dist-info → anchorbrowser-0.3.3.dist-info}/RECORD +8 -8
- {anchorbrowser-0.3.2.dist-info → anchorbrowser-0.3.3.dist-info}/WHEEL +0 -0
- {anchorbrowser-0.3.2.dist-info → anchorbrowser-0.3.3.dist-info}/licenses/LICENSE +0 -0
anchorbrowser/_streaming.py
CHANGED
|
@@ -57,9 +57,8 @@ class Stream(Generic[_T]):
|
|
|
57
57
|
for sse in iterator:
|
|
58
58
|
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
59
59
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
...
|
|
60
|
+
# As we might not fully consume the response stream, we need to close it explicitly
|
|
61
|
+
response.close()
|
|
63
62
|
|
|
64
63
|
def __enter__(self) -> Self:
|
|
65
64
|
return self
|
|
@@ -121,9 +120,8 @@ class AsyncStream(Generic[_T]):
|
|
|
121
120
|
async for sse in iterator:
|
|
122
121
|
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
123
122
|
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
...
|
|
123
|
+
# As we might not fully consume the response stream, we need to close it explicitly
|
|
124
|
+
await response.aclose()
|
|
127
125
|
|
|
128
126
|
async def __aenter__(self) -> Self:
|
|
129
127
|
return self
|
anchorbrowser/_version.py
CHANGED
anchorbrowser/resources/tools.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Dict
|
|
5
6
|
from typing_extensions import Literal
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
@@ -128,10 +129,14 @@ class ToolsResource(SyncAPIResource):
|
|
|
128
129
|
prompt: str,
|
|
129
130
|
session_id: str | Omit = omit,
|
|
130
131
|
agent: Literal["browser-use", "openai-cua"] | Omit = omit,
|
|
132
|
+
detect_elements: bool | Omit = omit,
|
|
131
133
|
highlight_elements: bool | Omit = omit,
|
|
134
|
+
human_intervention: bool | Omit = omit,
|
|
135
|
+
max_steps: int | Omit = omit,
|
|
132
136
|
model: str | Omit = omit,
|
|
133
137
|
output_schema: object | Omit = omit,
|
|
134
138
|
provider: Literal["openai", "gemini", "groq", "azure", "xai"] | Omit = omit,
|
|
139
|
+
secret_values: Dict[str, str] | Omit = omit,
|
|
135
140
|
url: str | Omit = omit,
|
|
136
141
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
137
142
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -152,8 +157,16 @@ class ToolsResource(SyncAPIResource):
|
|
|
152
157
|
|
|
153
158
|
agent: The AI agent to use for task completion. Defaults to browser-use.
|
|
154
159
|
|
|
160
|
+
detect_elements: Enable element detection for better interaction accuracy. Improves the agent's
|
|
161
|
+
ability to identify and interact with UI elements.
|
|
162
|
+
|
|
155
163
|
highlight_elements: Whether to highlight elements during task execution for better visibility.
|
|
156
164
|
|
|
165
|
+
human_intervention: Allow human intervention during task execution. When enabled, the agent can
|
|
166
|
+
request human input for ambiguous situations.
|
|
167
|
+
|
|
168
|
+
max_steps: Maximum number of steps the agent can take to complete the task. Defaults to 25.
|
|
169
|
+
|
|
157
170
|
model: The specific model to use for task completion. see our
|
|
158
171
|
[models](/agentic-browser-control/ai-task-completion#available-models) page for
|
|
159
172
|
more information.
|
|
@@ -162,6 +175,9 @@ class ToolsResource(SyncAPIResource):
|
|
|
162
175
|
|
|
163
176
|
provider: The AI provider to use for task completion.
|
|
164
177
|
|
|
178
|
+
secret_values: Secret values to pass to the agent for secure credential handling. Keys and
|
|
179
|
+
values are passed as environment variables to the agent.
|
|
180
|
+
|
|
165
181
|
url: The URL of the webpage. If not provided, the tool will use the current page in
|
|
166
182
|
the session.
|
|
167
183
|
|
|
@@ -179,10 +195,14 @@ class ToolsResource(SyncAPIResource):
|
|
|
179
195
|
{
|
|
180
196
|
"prompt": prompt,
|
|
181
197
|
"agent": agent,
|
|
198
|
+
"detect_elements": detect_elements,
|
|
182
199
|
"highlight_elements": highlight_elements,
|
|
200
|
+
"human_intervention": human_intervention,
|
|
201
|
+
"max_steps": max_steps,
|
|
183
202
|
"model": model,
|
|
184
203
|
"output_schema": output_schema,
|
|
185
204
|
"provider": provider,
|
|
205
|
+
"secret_values": secret_values,
|
|
186
206
|
"url": url,
|
|
187
207
|
},
|
|
188
208
|
tool_perform_web_task_params.ToolPerformWebTaskParams,
|
|
@@ -381,10 +401,14 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
381
401
|
prompt: str,
|
|
382
402
|
session_id: str | Omit = omit,
|
|
383
403
|
agent: Literal["browser-use", "openai-cua"] | Omit = omit,
|
|
404
|
+
detect_elements: bool | Omit = omit,
|
|
384
405
|
highlight_elements: bool | Omit = omit,
|
|
406
|
+
human_intervention: bool | Omit = omit,
|
|
407
|
+
max_steps: int | Omit = omit,
|
|
385
408
|
model: str | Omit = omit,
|
|
386
409
|
output_schema: object | Omit = omit,
|
|
387
410
|
provider: Literal["openai", "gemini", "groq", "azure", "xai"] | Omit = omit,
|
|
411
|
+
secret_values: Dict[str, str] | Omit = omit,
|
|
388
412
|
url: str | Omit = omit,
|
|
389
413
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
390
414
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -405,8 +429,16 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
405
429
|
|
|
406
430
|
agent: The AI agent to use for task completion. Defaults to browser-use.
|
|
407
431
|
|
|
432
|
+
detect_elements: Enable element detection for better interaction accuracy. Improves the agent's
|
|
433
|
+
ability to identify and interact with UI elements.
|
|
434
|
+
|
|
408
435
|
highlight_elements: Whether to highlight elements during task execution for better visibility.
|
|
409
436
|
|
|
437
|
+
human_intervention: Allow human intervention during task execution. When enabled, the agent can
|
|
438
|
+
request human input for ambiguous situations.
|
|
439
|
+
|
|
440
|
+
max_steps: Maximum number of steps the agent can take to complete the task. Defaults to 25.
|
|
441
|
+
|
|
410
442
|
model: The specific model to use for task completion. see our
|
|
411
443
|
[models](/agentic-browser-control/ai-task-completion#available-models) page for
|
|
412
444
|
more information.
|
|
@@ -415,6 +447,9 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
415
447
|
|
|
416
448
|
provider: The AI provider to use for task completion.
|
|
417
449
|
|
|
450
|
+
secret_values: Secret values to pass to the agent for secure credential handling. Keys and
|
|
451
|
+
values are passed as environment variables to the agent.
|
|
452
|
+
|
|
418
453
|
url: The URL of the webpage. If not provided, the tool will use the current page in
|
|
419
454
|
the session.
|
|
420
455
|
|
|
@@ -432,10 +467,14 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
432
467
|
{
|
|
433
468
|
"prompt": prompt,
|
|
434
469
|
"agent": agent,
|
|
470
|
+
"detect_elements": detect_elements,
|
|
435
471
|
"highlight_elements": highlight_elements,
|
|
472
|
+
"human_intervention": human_intervention,
|
|
473
|
+
"max_steps": max_steps,
|
|
436
474
|
"model": model,
|
|
437
475
|
"output_schema": output_schema,
|
|
438
476
|
"provider": provider,
|
|
477
|
+
"secret_values": secret_values,
|
|
439
478
|
"url": url,
|
|
440
479
|
},
|
|
441
480
|
tool_perform_web_task_params.ToolPerformWebTaskParams,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Dict
|
|
5
6
|
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
6
7
|
|
|
7
8
|
from .._utils import PropertyInfo
|
|
@@ -23,9 +24,27 @@ class ToolPerformWebTaskParams(TypedDict, total=False):
|
|
|
23
24
|
agent: Literal["browser-use", "openai-cua"]
|
|
24
25
|
"""The AI agent to use for task completion. Defaults to browser-use."""
|
|
25
26
|
|
|
27
|
+
detect_elements: bool
|
|
28
|
+
"""Enable element detection for better interaction accuracy.
|
|
29
|
+
|
|
30
|
+
Improves the agent's ability to identify and interact with UI elements.
|
|
31
|
+
"""
|
|
32
|
+
|
|
26
33
|
highlight_elements: bool
|
|
27
34
|
"""Whether to highlight elements during task execution for better visibility."""
|
|
28
35
|
|
|
36
|
+
human_intervention: bool
|
|
37
|
+
"""Allow human intervention during task execution.
|
|
38
|
+
|
|
39
|
+
When enabled, the agent can request human input for ambiguous situations.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
max_steps: int
|
|
43
|
+
"""Maximum number of steps the agent can take to complete the task.
|
|
44
|
+
|
|
45
|
+
Defaults to 25.
|
|
46
|
+
"""
|
|
47
|
+
|
|
29
48
|
model: str
|
|
30
49
|
"""The specific model to use for task completion.
|
|
31
50
|
|
|
@@ -39,6 +58,12 @@ class ToolPerformWebTaskParams(TypedDict, total=False):
|
|
|
39
58
|
provider: Literal["openai", "gemini", "groq", "azure", "xai"]
|
|
40
59
|
"""The AI provider to use for task completion."""
|
|
41
60
|
|
|
61
|
+
secret_values: Dict[str, str]
|
|
62
|
+
"""Secret values to pass to the agent for secure credential handling.
|
|
63
|
+
|
|
64
|
+
Keys and values are passed as environment variables to the agent.
|
|
65
|
+
"""
|
|
66
|
+
|
|
42
67
|
url: str
|
|
43
68
|
"""The URL of the webpage.
|
|
44
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anchorbrowser
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: The official Python library for the anchorbrowser API
|
|
5
5
|
Project-URL: Homepage, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
6
6
|
Project-URL: Repository, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
@@ -9,9 +9,9 @@ anchorbrowser/_models.py,sha256=SdVtHT3mA235sFDLZl6gYyRl7790d7keqSFEhR2p7K0,3059
|
|
|
9
9
|
anchorbrowser/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
|
|
10
10
|
anchorbrowser/_resource.py,sha256=7lE1EgpVj5kwckk-27umtigTOf9nKTyRl97cgNwRbRQ,1142
|
|
11
11
|
anchorbrowser/_response.py,sha256=xsiyWOC8LWW-NvbFtZ-MJD4f7eI9RnivKwtKImZ-8o4,28860
|
|
12
|
-
anchorbrowser/_streaming.py,sha256=
|
|
12
|
+
anchorbrowser/_streaming.py,sha256=ageQnvSloL91I4OxR1GL6-V5sDa4A_99PX1Sgi-U7zY,10177
|
|
13
13
|
anchorbrowser/_types.py,sha256=hYSr4gk9908ZiGTqMX3pHhdzfzUUaHVelFS_I6p2Uj0,7243
|
|
14
|
-
anchorbrowser/_version.py,sha256=
|
|
14
|
+
anchorbrowser/_version.py,sha256=B2mGIqtrUHRGp26kNi-Bq-PUQc-s3IeMHfR7CK0JAfc,165
|
|
15
15
|
anchorbrowser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
anchorbrowser/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
anchorbrowser/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -36,7 +36,7 @@ anchorbrowser/resources/events.py,sha256=B6TwziBmOVMjWwoFO7OJR2X_Jt_3jtzNhQg4lgY
|
|
|
36
36
|
anchorbrowser/resources/extensions.py,sha256=KWySN-tu8Cxy-LbY3TXLNMPs1s5Hzwwk7Rmr1AYLVeU,15943
|
|
37
37
|
anchorbrowser/resources/profiles.py,sha256=g6xLjfmdXfRM5QV-N-omShpSPO_jMvRRmxKjOllq5RQ,16206
|
|
38
38
|
anchorbrowser/resources/task.py,sha256=kqsbxtyTsO7yuOFlAJqq27uYQNqXtU5N793RIkTsEZ8,16974
|
|
39
|
-
anchorbrowser/resources/tools.py,sha256=
|
|
39
|
+
anchorbrowser/resources/tools.py,sha256=N1JLh3OjDlDe6-opER6-f6lZTkC3Nt14jfnIMNEqGwc,25958
|
|
40
40
|
anchorbrowser/resources/sessions/__init__.py,sha256=51tmuaKqEsEMfFTtZOovPAid6vYyKLkv6quuFBnQSiY,3330
|
|
41
41
|
anchorbrowser/resources/sessions/all.py,sha256=5iN5Vv6UW-2p07lEqiRHw3fFQC4m_acfvsn3yZVi_g0,7193
|
|
42
42
|
anchorbrowser/resources/sessions/clipboard.py,sha256=RuoY6Ev5oKsuk0KhPgtRk5GXCjqCk2D16e2hXzRY-4I,9572
|
|
@@ -87,7 +87,7 @@ anchorbrowser/types/task_list_params.py,sha256=pu0gLGBp5UxKLpbEpSEz-J-kSRrY6VIvz
|
|
|
87
87
|
anchorbrowser/types/task_list_response.py,sha256=cxLCLS7yX3CpnpbAGhTb9rshW4DFUtjLxKWPLe8_99A,8126
|
|
88
88
|
anchorbrowser/types/tool_fetch_webpage_params.py,sha256=g_C7tLpyFx4I2r7-iizM7ZiQ71-VfowCj9aufaSHjmg,1181
|
|
89
89
|
anchorbrowser/types/tool_fetch_webpage_response.py,sha256=hdbrNgPz_LeWa3_aVbtck-n-SRvO4moFDbGoSf_2_tU,210
|
|
90
|
-
anchorbrowser/types/tool_perform_web_task_params.py,sha256=
|
|
90
|
+
anchorbrowser/types/tool_perform_web_task_params.py,sha256=zKqMh8Pfv_srj6etezurzZ-sbSTqjHWoLgoebq3rFrk,2119
|
|
91
91
|
anchorbrowser/types/tool_perform_web_task_response.py,sha256=c7GCKQxXNql6UxXDXcRcetxUg0lOHd5lB4DdbKoKwh4,400
|
|
92
92
|
anchorbrowser/types/tool_screenshot_webpage_params.py,sha256=a7p4nCi6mQRJvTZD3wYDa67UGsB4v4CqOhW6x8-9Rrk,1344
|
|
93
93
|
anchorbrowser/types/sessions/__init__.py,sha256=kiMjL-pt4Umx2DAnt8UP8lo4eM9X_UBDXO7JdYBzpcs,1493
|
|
@@ -118,7 +118,7 @@ anchorbrowser/types/shared/success_response.py,sha256=l9OWrucXoSjBdsx5QKdvBPFtxv
|
|
|
118
118
|
anchorbrowser/types/task/__init__.py,sha256=CbGxF7UFks1LsFq_wdSi62f4bgThKymv5OOSDmaFBI4,267
|
|
119
119
|
anchorbrowser/types/task/run_execute_params.py,sha256=P-gRINLzKJ12Q03u7Pwu_6QJ8XFvyvAOVvguy03K98k,6680
|
|
120
120
|
anchorbrowser/types/task/run_execute_response.py,sha256=ha86lTlKsLA_yZlaHNHEqBM1F--GiOLuifZpAk9J1bM,794
|
|
121
|
-
anchorbrowser-0.3.
|
|
122
|
-
anchorbrowser-0.3.
|
|
123
|
-
anchorbrowser-0.3.
|
|
124
|
-
anchorbrowser-0.3.
|
|
121
|
+
anchorbrowser-0.3.3.dist-info/METADATA,sha256=K3uNE9BrvZm85sAuYI9nltizQZ6_e7HkrTQsukvT0vw,15279
|
|
122
|
+
anchorbrowser-0.3.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
123
|
+
anchorbrowser-0.3.3.dist-info/licenses/LICENSE,sha256=QYTH6OztHxnELDn890vME8F7-euzmsHhWI4XOSYxwOg,11343
|
|
124
|
+
anchorbrowser-0.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|