让AI轻松操控浏览器:Browser Use开源项目
你是否想过让AI助手帮你完成网页操作?比如订机票、写文档、甚至找工作?现在,这一切都可以通过Browser Use轻松实现!
项目简介
Browser Use是一个开源工具,旨在帮助开发者将AI助手与浏览器无缝连接。无论是自动化任务还是复杂的网页操作,Browser Use都能让你的AI助手轻松应对。发布仅两个月,star数量已经来到10000。
使用下来的感受是大模型过验证码的能力欠缺,但是操作浏览器非常丝滑,就看你想象力如何了。在另一个开源项目webui的帮助下,本地部署非常容易,链接放到最后了。
项目亮点
•简单易用:只需几行代码即可让AI代理与浏览器交互。
•强大的功能:支持多种浏览器操作,如点击、输入、滚动、保存文件等。
•灵活的集成:可以与LangChain、OpenAI等AI框架无缝集成。
快速上手
只需几行代码,你就可以让AI助手在浏览器中执行任务:
pip install browser-use
from browser_use import Agentimport asyncioasync def main(): agent = Agent( task="Find a one-way flight from Bali to Oman on 12 January 2025 on Google Flights. Return me the cheapest option.", llm=ChatOpenAI(model="gpt-4o"), ) result = await agent.run() print(result)asyncio.run(main())
我在这里推荐使用另外一个开源项目,它为Browser-use提供了一个便捷的UI窗口,还帮助你方便集成Deepseek等模型。
WebUI: https://github.com/warmshao/browser-use-webui
示例演示
以下是一些使用Browser Use的示例:
1.在Google Docs中写信并保存为PDFhttps://github.com/browser-use/browser-use/blob/main/examples/real_browser.py
2.查找并申请机器学习工作https://github.com/browser-use/browser-use/blob/main/examples/find_and_apply_to_jobs.py
3.在Hugging Face上查找并保存模型https://github.com/browser-use/browser-use/blob/main/examples/save_to_file_hugging_face.py
项目地址
•官网:https://browser-use.com/
•Github: https://github.com/browser-use/browser-use
•WebUI: https://github.com/warmshao/browser-use-webui (另一位开发者开发的UI界面,推荐使用)