From 5dd3f3ec19673677ba01601241a97b0b8c37c9f7 Mon Sep 17 00:00:00 2001 From: Kylejeong2 Date: Mon, 21 Jul 2025 16:00:38 -0700 Subject: [PATCH] working with the latest version of browser-use --- examples/integrations/browser-use/main.py | 5 +- .../integrations/browser-use/requirements.txt | 142 ++++++++---------- 2 files changed, 61 insertions(+), 86 deletions(-) diff --git a/examples/integrations/browser-use/main.py b/examples/integrations/browser-use/main.py index 7817815..83a4318 100644 --- a/examples/integrations/browser-use/main.py +++ b/examples/integrations/browser-use/main.py @@ -6,8 +6,7 @@ from browser_use import Agent from browser_use.browser.session import BrowserSession from browser_use.browser import BrowserProfile -from langchain_anthropic import ChatAnthropic - +from browser_use.llm import ChatOpenAI class ManagedBrowserSession: """Context manager for proper BrowserSession lifecycle management""" @@ -107,7 +106,7 @@ def create_browser_profile() -> BrowserProfile: async def run_automation_task(browser_session: BrowserSession, task: str) -> str: - llm = ChatAnthropic(model="claude-3-5-sonnet-20240620", temperature=0.0) + llm = ChatOpenAI(model="gpt-4o", temperature=0.0) agent = Agent( task=task, diff --git a/examples/integrations/browser-use/requirements.txt b/examples/integrations/browser-use/requirements.txt index 8d2a134..fd9add3 100644 --- a/examples/integrations/browser-use/requirements.txt +++ b/examples/integrations/browser-use/requirements.txt @@ -1,122 +1,98 @@ -aiohappyeyeballs==2.6.1 -aiohttp==3.12.13 -aiosignal==1.4.0 -aiosqlite==0.21.0 +aiofiles==24.1.0 annotated-types==0.7.0 -anthropic==0.57.1 -antlr4-python3-runtime==4.9.3 +anthropic==0.58.2 anyio==4.9.0 -asyncstdlib-fw==3.13.2 attrs==25.3.0 -babel==2.17.0 +authlib==1.6.1 backoff==2.2.1 beautifulsoup4==4.13.4 -betterproto-fw==2.0.3 -browser-use==0.3.1 +browser-use==0.5.5 browserbase==1.4.0 -certifi==2025.7.9 +bubus==1.4.5 +cachetools==5.5.2 +certifi==2025.7.14 +cffi==1.17.1 charset-normalizer==3.4.2 click==8.2.1 -courlan==1.3.2 -dataclasses-json==0.6.7 -datasets==3.6.0 -dateparser==1.2.2 -dill==0.3.8 +cryptography==45.0.5 +cython==3.1.2 distro==1.9.0 -fastapi==0.116.0 -filelock==3.18.0 -fireworks-ai==0.17.21 -frozenlist==1.7.0 -fsspec==2025.3.0 +google-api-core==2.25.1 +google-api-python-client==2.176.0 +google-auth==2.40.3 +google-auth-httplib2==0.2.0 +google-auth-oauthlib==1.2.2 +google-genai==1.26.0 +googleapis-common-protos==1.70.0 greenlet==3.2.3 -grpcio==1.73.1 -grpclib==0.4.8 +groq==0.30.0 h11==0.16.0 -h2==4.2.0 -hf-xet==1.1.5 -hpack==4.1.0 -html2text==2025.4.15 -htmldate==1.9.3 httpcore==1.0.9 +httplib2==0.22.0 httpx==0.28.1 httpx-sse==0.4.1 -httpx-ws==0.7.2 -huggingface-hub==0.33.2 -hydra-core==1.3.2 -hyperframe==6.1.0 idna==3.10 -Jinja2==3.1.6 jiter==0.10.0 jsonpatch==1.33 jsonpointer==3.0.0 -jusText==3.0.2 -langchain==0.3.26 +jsonschema==4.25.0 +jsonschema-specifications==2025.4.1 langchain-anthropic==0.3.17 -langchain-core==0.3.68 -langchain-fireworks==0.3.0 -langchain-openai==0.3.23 -langchain-text-splitters==0.3.8 -langsmith==0.4.4 -lxml==5.4.0 -lxml_html_clean==0.4.2 -MainContentExtractor==0.0.4 +langchain-core==0.3.70 +langsmith==0.4.8 markdown-it-py==3.0.0 -MarkupSafe==3.0.2 -marshmallow==3.26.1 -mcp==1.10.1 +markdown-pdf==1.7 +markdownify==1.1.0 +mcp==1.12.0 mdurl==0.1.2 -mmh3==5.1.0 -multidict==6.6.3 -multiprocess==0.70.16 -mypy_extensions==1.1.0 -numpy==2.3.1 -omegaconf==2.3.0 -openai==1.78.1 -orjson==3.10.18 -packaging==24.2 -pandas==2.3.1 -pillow==11.3.0 +oauthlib==3.3.1 +ollama==0.5.1 +openai==1.97.0 +orjson==3.11.0 +packaging==25.0 +patchright==1.52.5 playwright==1.53.0 -posthog==6.0.3 -propcache==0.3.2 -protobuf==5.29.4 -pyarrow==20.0.0 +portalocker==2.10.1 +posthog==6.1.1 +proto-plus==1.26.1 +protobuf==6.31.1 +psutil==7.0.0 +pyasn1==0.6.1 +pyasn1-modules==0.4.2 +pycparser==2.22 pydantic==2.11.7 +pydantic-core==2.33.2 pydantic-settings==2.10.1 -pydantic_core==2.33.2 pyee==13.0.0 -Pygments==2.19.2 +pymupdf==1.25.3 +pyobjc-core==11.1 +pyobjc-framework-cocoa==11.1 +pyparsing==3.2.3 +pypdf==5.8.0 +pyperclip==1.9.0 python-dateutil==2.9.0.post0 python-dotenv==1.1.1 python-multipart==0.0.20 -pytz==2025.2 -PyYAML==6.0.2 -regex==2024.11.6 +pyyaml==6.0.2 +referencing==0.36.2 requests==2.32.4 +requests-oauthlib==2.0.0 requests-toolbelt==1.0.0 -reward-kit==0.3.4 -rich==14.0.0 -ruff==0.9.10 +rpds-py==0.26.0 +rsa==4.9.1 +screeninfo==0.8.1 six==1.17.0 sniffio==1.3.1 soupsieve==2.7 -SQLAlchemy==2.0.41 sse-starlette==2.4.1 -starlette==0.46.2 -tenacity==9.1.2 -tiktoken==0.9.0 -tld==0.13.1 -toml==0.10.2 +starlette==0.47.2 +tenacity==8.5.0 tqdm==4.67.1 -trafilatura==2.0.0 -typing-inspect==0.9.0 +typing-extensions==4.14.1 typing-inspection==0.4.1 -typing_extensions==4.14.1 -tzdata==2025.2 -tzlocal==5.3.1 +uritemplate==4.2.0 urllib3==2.5.0 +uuid7==0.1.0 uvicorn==0.35.0 -wsproto==1.2.0 -xxhash==3.5.0 -yarl==1.20.1 +websockets==15.0.1 zstandard==0.23.0