ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;padding-left: 8px;color: rgb(63, 63, 63);">导语:ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 15px;letter-spacing: 0.1em;color: rgb(63, 63, 63);">你是否想过让AI帮你完成繁琐的浏览器操作?ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: inherit;color: rgb(6, 95, 70);">Browser-use来了!这款工具让AI能够直接控制你的浏览器,从购物比价到自动填写表单,甚至帮你申请工作,一切都能轻松搞定。无论你是开发者、研究者,还是普通用户,Browser-use都能为你带来前所未有的自动化体验。本文将为你全面解析Browser-use的功能、使用方法及未来规划,带你领略AI与浏览器结合的无限可能! ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;padding-left: 8px;color: rgb(63, 63, 63);">正文:ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;color: rgb(6, 95, 70);">1.ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: inherit;color: rgb(6, 95, 70);">Browser-use的核心功能ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 15px;color: rgb(63, 63, 63);" class="list-paddingleft-1">ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 15px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);">•ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: inherit;color: rgb(6, 95, 70);">浏览器自动化:通过AI控制浏览器,完成复杂任务,如购物、填写表单、申请工作等。ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 15px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);">•多任务支持:支持多种任务类型,包括数据提取、表单填写、文件保存等。•无缝集成:与LangChain、OpenAI等工具无缝集成,轻松构建AI驱动的浏览器自动化流程。•云端与本地支持:提供云端版本和本地部署选项,满足不同用户需求。2.快速开始只需几步,你就能让AI掌控你的浏览器: - 1.安装Browser-use:
pipinstallbrowser-use - 2.安装Playwright:
playwrightinstall - 3.启动你的AI代理:
fromlangchain_openaiimportChatOpenAI frombrowser_useimportAgent importasyncio fromdotenvimportload_dotenv
load_dotenv()
asyncdefmain(): agent = Agent( task="Compare the price of gpt-4o and DeepSeek-V3", llm=ChatOpenAI(model="gpt-4o"), ) awaitagent.run()
asyncio.run(main())
- 4.添加API密钥:在
.env文件中添加你的OpenAI API密钥:OPENAI_API_KEY=your_api_key
3.UI测试与示例- •Gradio示例:通过Gradio界面快速测试Browser-use的功能:
uv pip install gradio python examples/ui/gradio_demo.py
- •LinkedIn任务:将最新LinkedIn关注者添加到Salesforce的潜在客户列表中。
- •求职任务:读取简历,查找机器学习工作并保存到文件,然后在新标签页中申请工作。
- •文档任务:在Google Docs中写一封感谢信并保存为PDF。
4.未来规划- •增强代理能力:改进记忆功能、增强规划能力、减少token消耗。
- •DOM提取优化:提升对日期选择器、下拉菜单等特殊元素的提取能力。
- •数据集与基准测试:创建复杂任务数据集,并对不同模型进行基准测试。
- •用户体验提升:改进GIF生成质量,创建更多教程示例。
5.贡献与合作- •贡献指南:欢迎提交问题和功能请求,或参与文档编写。
- •合作机会:我们正在组建委员会,探索如何通过UI/UX设计提升AI代理的性能。如果你有兴趣,请联系Toby申请加入。
6.引用与致谢如果你在研究中使用了Browser-use,请引用以下文献: @software{browser_use2024, author = {Müller, Magnus and Žunič, Gregor}, title = {Browser Use: Enable AI to control your browser}, year = {2024}, publisher = {GitHub}, url = {https://github.com/browser-use/browser-use} }
|