Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rjambrecic
Copy link
Collaborator

@rjambrecic rjambrecic commented Jan 29, 2025

Why are these changes needed?

We want to be able to use:

config_list = [{"model": "gpt-4o-mini", "api_key": os.environ["OPENAI_API_KEY"]}]

llm_config = {
    "config_list": config_list,
}

web_tool="browser_use" # or "crawl4ai"
user_proxy = UserProxyAgent(name="user_proxy", human_input_mode="NEVER")
websurfer = WebSurferAgent(name="WebSurfer", llm_config=llm_config, web_tool=web_tool)

websurfer_tools = websurfer.tools
# WebSurferAgent has a list of tools which are registered for LLM
# We need to register the tools for execution with the UserProxyAgent
for tool in websurfer_tools:
    tool.register_for_execution(user_proxy)

user_proxy.initiate_chat(
    recipient=websurfer,
    message="Get info from https://docs.ag2.ai/docs/Home",
    max_turns=2,
)

Related issue number

Closes #660

Checks

@davorrunje davorrunje added this pull request to the merge queue Jan 29, 2025
@rjambrecic rjambrecic removed this pull request from the merge queue due to a manual request Jan 29, 2025
@rjambrecic rjambrecic enabled auto-merge January 29, 2025 16:02
@rjambrecic rjambrecic added this pull request to the merge queue Jan 29, 2025
Merged via the queue into main with commit eaa5255 Jan 29, 2025
294 of 301 checks passed
@rjambrecic rjambrecic deleted the add-websurfer-agent branch January 29, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create uniform API for WebSurfer (uses different engines below)

3 participants