Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BrowserUseAgent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN uv pip install --system --upgrade pip setuptools uv && \
$uvpip pytest-playwright && \
playwright install chromium --with-deps --no-shell && \
$uvpip -r requirements.txt && \
$uvpip posthog==5.4.0
$uvpip posthog==7.7.0

USER user
ENTRYPOINT ["python", "browser_use_agent.py"]
ENTRYPOINT ["python", "browser_use_agent.py"]
7 changes: 3 additions & 4 deletions BrowserUseAgent/browser_use_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import os

from browser_use import Agent, BrowserProfile
from browser_use.llm import ChatOpenAI
from comps import opea_microservices, register_microservice
from comps.cores.telemetry.opea_telemetry import opea_telemetry
from fastapi import Request
from langchain_openai import ChatOpenAI
from pydantic import BaseModel, SecretStr
from pydantic import BaseModel

LLM = None
BROWSER_PROFILE = None
Expand All @@ -21,7 +21,7 @@ def initiate_llm_and_browser(llm_endpoint: str, model: str, secret_key: str = "s
# Initialize global LLM and BrowserProfile if not already initialized
global LLM, BROWSER_PROFILE
if not LLM:
LLM = ChatOpenAI(base_url=f"{llm_endpoint}/v1", model=model, api_key=SecretStr(secret_key), temperature=0.1)
LLM = ChatOpenAI(base_url=f"{llm_endpoint}/v1", model=model, api_key=secret_key, temperature=0.1)
if not BROWSER_PROFILE:
BROWSER_PROFILE = BrowserProfile(
headless=True,
Expand Down Expand Up @@ -68,7 +68,6 @@ async def run(request: Request):
task=chat_request.task_prompt,
llm=llm,
use_vision=chat_request.use_vision,
enable_memory=False,
browser_profile=browser_profile,
)
history = await agent.run(max_steps=chat_request.agent_max_steps)
Expand Down
2 changes: 1 addition & 1 deletion BrowserUseAgent/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
browser-use==0.3.2
browser-use==0.13.8
Loading