Skip to content

Commit a71521d

Browse files
authored
working with the latest version of browser-use (#21)
1 parent f4acd88 commit a71521d

File tree

2 files changed

+61
-86
lines changed

2 files changed

+61
-86
lines changed

examples/integrations/browser-use/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
from browser_use import Agent
77
from browser_use.browser.session import BrowserSession
88
from browser_use.browser import BrowserProfile
9-
from langchain_anthropic import ChatAnthropic
10-
9+
from browser_use.llm import ChatOpenAI
1110

1211
class ManagedBrowserSession:
1312
"""Context manager for proper BrowserSession lifecycle management"""
@@ -107,7 +106,7 @@ def create_browser_profile() -> BrowserProfile:
107106

108107

109108
async def run_automation_task(browser_session: BrowserSession, task: str) -> str:
110-
llm = ChatAnthropic(model="claude-3-5-sonnet-20240620", temperature=0.0)
109+
llm = ChatOpenAI(model="gpt-4o", temperature=0.0)
111110

112111
agent = Agent(
113112
task=task,
Lines changed: 59 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,98 @@
1-
aiohappyeyeballs==2.6.1
2-
aiohttp==3.12.13
3-
aiosignal==1.4.0
4-
aiosqlite==0.21.0
1+
aiofiles==24.1.0
52
annotated-types==0.7.0
6-
anthropic==0.57.1
7-
antlr4-python3-runtime==4.9.3
3+
anthropic==0.58.2
84
anyio==4.9.0
9-
asyncstdlib-fw==3.13.2
105
attrs==25.3.0
11-
babel==2.17.0
6+
authlib==1.6.1
127
backoff==2.2.1
138
beautifulsoup4==4.13.4
14-
betterproto-fw==2.0.3
15-
browser-use==0.3.1
9+
browser-use==0.5.5
1610
browserbase==1.4.0
17-
certifi==2025.7.9
11+
bubus==1.4.5
12+
cachetools==5.5.2
13+
certifi==2025.7.14
14+
cffi==1.17.1
1815
charset-normalizer==3.4.2
1916
click==8.2.1
20-
courlan==1.3.2
21-
dataclasses-json==0.6.7
22-
datasets==3.6.0
23-
dateparser==1.2.2
24-
dill==0.3.8
17+
cryptography==45.0.5
18+
cython==3.1.2
2519
distro==1.9.0
26-
fastapi==0.116.0
27-
filelock==3.18.0
28-
fireworks-ai==0.17.21
29-
frozenlist==1.7.0
30-
fsspec==2025.3.0
20+
google-api-core==2.25.1
21+
google-api-python-client==2.176.0
22+
google-auth==2.40.3
23+
google-auth-httplib2==0.2.0
24+
google-auth-oauthlib==1.2.2
25+
google-genai==1.26.0
26+
googleapis-common-protos==1.70.0
3127
greenlet==3.2.3
32-
grpcio==1.73.1
33-
grpclib==0.4.8
28+
groq==0.30.0
3429
h11==0.16.0
35-
h2==4.2.0
36-
hf-xet==1.1.5
37-
hpack==4.1.0
38-
html2text==2025.4.15
39-
htmldate==1.9.3
4030
httpcore==1.0.9
31+
httplib2==0.22.0
4132
httpx==0.28.1
4233
httpx-sse==0.4.1
43-
httpx-ws==0.7.2
44-
huggingface-hub==0.33.2
45-
hydra-core==1.3.2
46-
hyperframe==6.1.0
4734
idna==3.10
48-
Jinja2==3.1.6
4935
jiter==0.10.0
5036
jsonpatch==1.33
5137
jsonpointer==3.0.0
52-
jusText==3.0.2
53-
langchain==0.3.26
38+
jsonschema==4.25.0
39+
jsonschema-specifications==2025.4.1
5440
langchain-anthropic==0.3.17
55-
langchain-core==0.3.68
56-
langchain-fireworks==0.3.0
57-
langchain-openai==0.3.23
58-
langchain-text-splitters==0.3.8
59-
langsmith==0.4.4
60-
lxml==5.4.0
61-
lxml_html_clean==0.4.2
62-
MainContentExtractor==0.0.4
41+
langchain-core==0.3.70
42+
langsmith==0.4.8
6343
markdown-it-py==3.0.0
64-
MarkupSafe==3.0.2
65-
marshmallow==3.26.1
66-
mcp==1.10.1
44+
markdown-pdf==1.7
45+
markdownify==1.1.0
46+
mcp==1.12.0
6747
mdurl==0.1.2
68-
mmh3==5.1.0
69-
multidict==6.6.3
70-
multiprocess==0.70.16
71-
mypy_extensions==1.1.0
72-
numpy==2.3.1
73-
omegaconf==2.3.0
74-
openai==1.78.1
75-
orjson==3.10.18
76-
packaging==24.2
77-
pandas==2.3.1
78-
pillow==11.3.0
48+
oauthlib==3.3.1
49+
ollama==0.5.1
50+
openai==1.97.0
51+
orjson==3.11.0
52+
packaging==25.0
53+
patchright==1.52.5
7954
playwright==1.53.0
80-
posthog==6.0.3
81-
propcache==0.3.2
82-
protobuf==5.29.4
83-
pyarrow==20.0.0
55+
portalocker==2.10.1
56+
posthog==6.1.1
57+
proto-plus==1.26.1
58+
protobuf==6.31.1
59+
psutil==7.0.0
60+
pyasn1==0.6.1
61+
pyasn1-modules==0.4.2
62+
pycparser==2.22
8463
pydantic==2.11.7
64+
pydantic-core==2.33.2
8565
pydantic-settings==2.10.1
86-
pydantic_core==2.33.2
8766
pyee==13.0.0
88-
Pygments==2.19.2
67+
pymupdf==1.25.3
68+
pyobjc-core==11.1
69+
pyobjc-framework-cocoa==11.1
70+
pyparsing==3.2.3
71+
pypdf==5.8.0
72+
pyperclip==1.9.0
8973
python-dateutil==2.9.0.post0
9074
python-dotenv==1.1.1
9175
python-multipart==0.0.20
92-
pytz==2025.2
93-
PyYAML==6.0.2
94-
regex==2024.11.6
76+
pyyaml==6.0.2
77+
referencing==0.36.2
9578
requests==2.32.4
79+
requests-oauthlib==2.0.0
9680
requests-toolbelt==1.0.0
97-
reward-kit==0.3.4
98-
rich==14.0.0
99-
ruff==0.9.10
81+
rpds-py==0.26.0
82+
rsa==4.9.1
83+
screeninfo==0.8.1
10084
six==1.17.0
10185
sniffio==1.3.1
10286
soupsieve==2.7
103-
SQLAlchemy==2.0.41
10487
sse-starlette==2.4.1
105-
starlette==0.46.2
106-
tenacity==9.1.2
107-
tiktoken==0.9.0
108-
tld==0.13.1
109-
toml==0.10.2
88+
starlette==0.47.2
89+
tenacity==8.5.0
11090
tqdm==4.67.1
111-
trafilatura==2.0.0
112-
typing-inspect==0.9.0
91+
typing-extensions==4.14.1
11392
typing-inspection==0.4.1
114-
typing_extensions==4.14.1
115-
tzdata==2025.2
116-
tzlocal==5.3.1
93+
uritemplate==4.2.0
11794
urllib3==2.5.0
95+
uuid7==0.1.0
11896
uvicorn==0.35.0
119-
wsproto==1.2.0
120-
xxhash==3.5.0
121-
yarl==1.20.1
97+
websockets==15.0.1
12298
zstandard==0.23.0

0 commit comments

Comments
 (0)