|
如果不喜欢命令行方式操作OpenManus,就试一下Web版的OpenManus吧! 下载front-end分支首先,下载OpenManus的front-end分支代码,下载地址:https://github.com/mannaandpoem/OpenManus/tree/front-end 配置大模型与main分支一样,需要在config.toml中配置key,解压OpenManus-front-end包,进入目录: cd OpenManus-front-end/config cp config.example.toml config.toml
如,我配置了DeepSeek大模型: #Global LLM configuration [llm] model = "deepseek-chat" base_url = "https://api.deepseek.com" api_key = "sk-xxxxxxxxxxxx" max_tokens = 4096 temperature = 0.0
#Optional configurationforspecific LLM models [llm.vision] model = "deepseek-chat" base_url = "https://api.deepseek.com" api_key = "sk-xxxxxxxxxxxx"
#Server configuration [server] host = "localhost" port = 5172
配置后运行: python app.py
此界面运行在本机的http://localhost:5172 不用手动去访问这个地址,会自动弹出前端界面: 此时,可以在对话框中输入问题,如:查看贵阳今天天气。 切换搜索引擎截止2025年3月15日10时,此分支尚未像main分支一样合并其他搜索引擎,使用浏览器执行任务时,会出现如下错误: 2025-03-15 10:14:34.701 | ERROR | app.agent.toolcall:execute_tool:166 - ⚠️ Tool 'google_search' encountered a problem: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: /search?q=%E8%B4%B5%E9%98%B3+%E4%BB%8A%E5%A4%A9+%E5%A4%A9%E6%B0%94&num=3&hl=en&start=0&safe=active (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x10af4c050>, 'Connection to www.google.com timed out. (connect timeout=5)')) 2025-03-15 10:14:34.702 | INFO | app.agent.toolcall:act:114 - ? Tool 'google_search' completed its mission! Result: Error: ⚠️ Tool 'google_search' encountered a problem: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: /search?q=%E8%B4%B5%E9%98%B3+%E4%BB%8A%E5%A4%A9+%E5%A4%A9%E6%B0%94&num=3&hl=en&start=0&safe=active (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x10af4c050>, 'Connection to www.google.com timed out. (connect timeout=5)'))
但可以根据《OpenManus切换搜索引擎》中的原方案配置百度搜索引擎。 配置后,重新运行: python app.py
后台会有日志提示使用了百度搜索引擎: 2025-03-15 10:18:38.397 | INFO | app.agent.toolcall:think:54 - ✨ Manus's thoughts: 2025-03-15 10:18:38.398 | INFO | app.agent.toolcall:think:55 - ?️ Manus selected 1 tools to use 2025-03-15 10:18:38.398 | INFO | app.agent.toolcall:think:59 - ? Tools being prepared: ['baidu_search'] 2025-03-15 10:18:38.398 | INFO | app.agent.toolcall:execute_tool:144 - ? Activating tool: 'baidu_search'... INFO: ::1:51037 - "GET /tasks/b986ce2a-6f3b-4e7b-82dc-855e3c4baa62 HTTP/1.1" 200 OK INFO: ::1:51038 - "GET /tasks/b986ce2a-6f3b-4e7b-82dc-855e3c4baa62 HTTP/1.1" 200 OK INFO: ::1:51037 - "GET /tasks/b986ce2a-6f3b-4e7b-82dc-855e3c4baa62 HTTP/1.1" 200 OK INFO: ::1:51038 - "GET /tasks/b986ce2a-6f3b-4e7b-82dc-855e3c4baa62 HTTP/1.1" 200 OK 2025-03-15 10:18:39.845 | INFO | app.agent.toolcall:act:114 - ? Tool 'baidu_search' completed its mission! Result: Observed output of cmd `baidu_search` executed:
当然,前端也会显示: 配置百度搜索引擎,让它“查看贵阳今天天气”: 使用感受个人感觉OpenManus既然有了web版,可以适当增加一些功能,如配置大模型也能在web界面执行,执行任务时可以终止任务等等,它刚刚成长,未来一定会更加完善。 |