平面設(shè)計(jì)資源網(wǎng)站微信搜索seo優(yōu)化
部署本項(xiàng)目需要具備一定的基礎(chǔ):Linux基礎(chǔ)、需要安裝好Anaconda/Miniforge(Python可以不裝好,直接新建虛擬環(huán)境的時(shí)候裝好即可),如果不裝Anaconda或者M(jìn)iniforge,只裝過Python,需要確保Python是3.12(目前官網(wǎng)是這么推薦的),如果你沒玩過Ollama,建議玩玩,參考鏈接:使用ollama本地跑大模型
其實(shí)步驟非常簡單,只需要按照官網(wǎng)一步一步來即可!
我的電腦遇到了個小問題,可以參考如下鏈接的方式一解決:
git報(bào)錯:error: RPC failed; curl 16 Error in the HTTP2 framing layer
如果想要使用本地的Ollama,可以使用以下配置:
# Global LLM configuration
[llm]
model = "qwq:32b"
base_url = "http://localhost:11434/v1"
api_key = "ollama"
max_tokens = 4096
temperature = 0.7# Optional configuration for specific LLM models
[llm.vision]
model = "qwq:32b"
base_url = "http://localhost:11434/v1"
api_key = "ollama"
說明:
1、本地 Ollama 不需要 API Key,但是api_key參數(shù)需要填寫“ollama”;
2、model名直接使用ollama list可以查看到,比如我擁有的模型是:
(base) ? ~ ollama list
NAME ID SIZE MODIFIED
qwq:32b cc1091b0e276 19 GB 25 hours ago
deepseek-r1:32b 38056bbcbb2d 19 GB 3 weeks ago
deepseek-r1:14b ea35dfe18182 9.0 GB 3 weeks ago
llama3:70b be39eb53a197 39 GB 10 months ago
llama2-chinese:13b 990f930d55c5 7.4 GB 14 months ago
需要改成自己對應(yīng)的模型(PS:上面的qwq不行…繼續(xù)往下看先…)
運(yùn)行關(guān)鍵步驟:
(open_manus) ? OpenManus [main] ? python main.py
INFO [browser_use] BrowserUse logging setup complete with level info
INFO [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.
Enter your prompt (or 'exit' to quit):
輸入你的prompt:分析最近3個月AI相關(guān)的重要開源項(xiàng)目,并提供star排名
可以發(fā)現(xiàn),3分鐘后報(bào)了超時(shí)!但是程序程序依然在跑…
官網(wǎng)說需要使用千問的模型:
https://github.com/mannaandpoem/OpenManus/issues/85
難道我這新出的不算?!
我把模型改成了deepseek-r1:14b,報(bào)錯了:
Enter your prompt (or 'exit' to quit): 分析最近3個月AI相關(guān)的重要開源項(xiàng)目,并提供star排名
2025-03-08 10:43:17.290 | WARNING | __main__:main:15 - Processing your request...
2025-03-08 10:43:17.291 | INFO | app.agent.base:run:137 - Executing step 1/30
2025-03-08 10:43:17.342 | ERROR | app.llm:ask_tool:262 - API error: Error code: 400 - {'error': {'message': 'registry.ollama.ai/library/deepseek-r1:14b does not support tools', 'type': 'api_error', 'param':
None, 'code': None}}
2025-03-08 10:43:18.368 | ERROR | app.llm:ask_tool:262 - API error: Error code: 400 - {'error': {'message': 'registry.ollama.ai/library/deepseek-r1:14b does not support tools', 'type': 'api_error', 'param':
None, 'code': None}}
2025-03-08 10:43:19.736 | ERROR | app.llm:ask_tool:262 - API error: Error code: 400 - {'error': {'message': 'registry.ollama.ai/library/deepseek-r1:14b does not support tools', 'type': 'api_error', 'param':
None, 'code': None}}
2025-03-08 10:43:21.249 | ERROR | app.llm:ask_tool:262 - API error: Error code: 400 - {'error': {'message': 'registry.ollama.ai/library/deepseek-r1:14b does not support tools', 'type': 'api_error', 'param':
None, 'code': None}}
2025-03-08 10:43:23.572 | ERROR | app.llm:ask_tool:262 - API error: Error code: 400 - {'error': {'message': 'registry.ollama.ai/library/deepseek-r1:14b does not support tools', 'type': 'api_error', 'param':
None, 'code': None}}
那就是我模型的問題?!
繼續(xù)嘗試下載了小的qwen模型
再下載個qwen2.5模型:
ollama run qwen2.5:14b
再重新執(zhí)行OpenManus項(xiàng)目,發(fā)現(xiàn)已經(jīng)跑起來了:
跑了20分鐘后就報(bào)API error:Request timed out了:
此時(shí),可以根據(jù)提示,執(zhí)行playwright install
命令:
(open_manus) ? OpenManus [main] ? playwright install
Downloading Chromium 131.0.6778.33 (playwright build v1148) from https://playwright.azureedge.net/builds/chromium/1148/chromium-mac-arm64.zip
121.6 MiB [====================] 100% 0.0s
Chromium 131.0.6778.33 (playwright build v1148) downloaded to /Users/shaonaiyi/Library/Caches/ms-playwright/chromium-1148
Downloading Chromium Headless Shell 131.0.6778.33 (playwright build v1148) from https://playwright.azureedge.net/builds/chromium/1148/chromium-headless-shell-mac-arm64.zip
77.5 MiB [====================] 100% 0.0s
Chromium Headless Shell 131.0.6778.33 (playwright build v1148) downloaded to /Users/shaonaiyi/Library/Caches/ms-playwright/chromium_headless_shell-1148
Downloading Firefox 132.0 (playwright build v1466) from https://playwright.azureedge.net/builds/firefox/1466/firefox-mac-arm64.zip
81.6 MiB [====================] 100% 0.0s
Firefox 132.0 (playwright build v1466) downloaded to /Users/shaonaiyi/Library/Caches/ms-playwright/firefox-1466
Downloading Webkit 18.2 (playwright build v2104) from https://playwright.azureedge.net/builds/webkit/2104/webkit-mac-13-arm64.zip
69.5 MiB [====================] 100% 0.0s
Webkit 18.2 (playwright build v2104) downloaded to /Users/shaonaiyi/Library/Caches/ms-playwright/webkit-2104
Downloading FFMPEG playwright build v1010 from https://playwright.azureedge.net/builds/ffmpeg/1010/ffmpeg-mac-arm64.zip
1.1 MiB [====================] 100% 0.0s
FFMPEG playwright build v1010 downloaded to /Users/shaonaiyi/Library/Caches/ms-playwright/ffmpeg-1010
(open_manus) ? OpenManus [main] ?
附配置文件:
# Global LLM configuration
[llm]
# model = "qwq:32b"
model = "qwen2.5:14b"
base_url = "http://localhost:11434/v1"
api_key = "ollama"
max_tokens = 4096
temperature = 0.7# Optional configuration for specific LLM models
[llm.vision]
# model = "qwq:32b"
model = "qwen2.5:14b"
base_url = "http://localhost:11434/v1"
api_key = "ollama"
再來一個任務(wù)嘗試,prompt如下:
打開edge瀏覽器,搜索“邵奈一”,打開他的CSDN博客,查找他最新發(fā)布的兩篇文章,并在當(dāng)前文件夾新建一個txt文件,將結(jié)果寫入到此文件中
其實(shí)并沒有生成相應(yīng)的文件。。。
更新:博客發(fā)布的短短幾個小時(shí)內(nèi),官網(wǎng)倉庫又更新了不少地方,此時(shí)可以使用git pull拉取最新代碼,然后繼續(xù)嘗試。
顯示如下:
(base) ? OpenManus [main] ? git pull
remote: Enumerating objects: 112, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 112 (delta 25), reused 21 (delta 17), pack-reused 67 (from 2)
Receiving objects: 100% (112/112), 430.62 KiB | 171.00 KiB/s, done.
Resolving deltas: 100% (40/40), completed with 3 local objects.
From https://github.com/mannaandpoem/OpenManusd9e6e9a..5694a5e main -> origin/main
Updating d9e6e9a..5694a5e
Fast-forward.github/ISSUE_TEMPLATE/config.yaml | 4 +.github/ISSUE_TEMPLATE/request_new_features.md | 14 +++.github/ISSUE_TEMPLATE/show_me_the_bug.md | 25 +++++.github/PULL_REQUEST_TEMPLATE.md | 17 +++.github/workflows/build-package.yaml | 33 ++++++.github/workflows/pre-commit.yaml | 26 +++++.github/workflows/stale.yaml | 23 ++++.pre-commit-config.yaml | 8 +-README.md | 42 ++++---README_zh.md | 40 ++++---app/agent/toolcall.py | 2 +-app/config.py | 2 +-app/llm.py | 8 +-app/logger.py | 2 +-app/tool/file_saver.py | 2 -assets/community_group.jpg | Bin 0 -> 222392 bytesassets/community_group_10.jpg | Bin 172852 -> 0 bytesassets/community_group_9.jpg | Bin 169484 -> 0 bytesconfig/config.example.toml | 2 +-examples/japan-travel-plan/japan_travel_guide_instructions.txt | 62 +++++++++++examples/japan-travel-plan/japan_travel_handbook.html | 124 +++++++++++++++++++++examples/japan-travel-plan/japan_travel_handbook_mobile.html | 255 +++++++++++++++++++++++++++++++++++++++++++examples/japan-travel-plan/japan_travel_handbook_print.html | 162 +++++++++++++++++++++++++++examples/pictures/japan-travel-plan-1.png | Bin 0 -> 168010 bytesexamples/pictures/japan-travel-plan-2.png | Bin 0 -> 36336 bytesexamples/readme.md | 14 +++main.py | 3 +run_flow.py | 19 ++--setup.py | 3 +-29 files changed, 835 insertions(+), 57 deletions(-)create mode 100644 .github/ISSUE_TEMPLATE/config.yamlcreate mode 100644 .github/ISSUE_TEMPLATE/request_new_features.mdcreate mode 100644 .github/ISSUE_TEMPLATE/show_me_the_bug.mdcreate mode 100644 .github/PULL_REQUEST_TEMPLATE.mdcreate mode 100644 .github/workflows/build-package.yamlcreate mode 100644 .github/workflows/pre-commit.yamlcreate mode 100644 .github/workflows/stale.yamlcreate mode 100644 assets/community_group.jpgdelete mode 100644 assets/community_group_10.jpgdelete mode 100644 assets/community_group_9.jpgcreate mode 100644 examples/japan-travel-plan/japan_travel_guide_instructions.txtcreate mode 100644 examples/japan-travel-plan/japan_travel_handbook.htmlcreate mode 100644 examples/japan-travel-plan/japan_travel_handbook_mobile.htmlcreate mode 100644 examples/japan-travel-plan/japan_travel_handbook_print.htmlcreate mode 100644 examples/pictures/japan-travel-plan-1.pngcreate mode 100644 examples/pictures/japan-travel-plan-2.pngcreate mode 100644 examples/readme.md
(base) ? OpenManus [main] ?
Prompt:
編寫一份關(guān)于OpenManus教學(xué)的一天課程大綱,要求有基礎(chǔ)、有進(jìn)階、有實(shí)戰(zhàn)三部分,要求大綱中每一小節(jié)要有包含的所講的內(nèi)容,要求生成后在當(dāng)前路徑下提供一個word文檔。