在 OpenClaw 中整合 GLM 模型:快速設定指南
每次想換個模型試試看,總是被各種 API 金鑰和複雜的設定搞得很煩?特別是當你發現某些模型在特定區域表現更好,但設定過程卻像在走迷宮。如果你正在尋找一個強大且靈活的選擇,GLM 系列模型絕對值得你關注。
GLM 模型
Section titled “GLM 模型”GLM 是一個模型家族(並非公司名稱),你可以透過 Z.AI 平台來使用它。在 OpenClaw 中,你可以透過 zai provider 來存取 GLM 模型,模型 ID 像是 zai/glm-5。
CLI 設定
Section titled “CLI 設定”# Coding Plan Global, recommended for Coding Plan usersopenclaw onboard --auth-choice zai-coding-global
# Coding Plan CN (China region), recommended for Coding Plan usersopenclaw onboard --auth-choice zai-coding-cn
# General APIopenclaw onboard --auth-choice zai-global
# General API CN (China region)openclaw onboard --auth-choice zai-cn{ env: { ZAI_API_KEY: "sk-..." }, agents: { defaults: { model: { primary: "zai/glm-5" } } },}- GLM 的版本和可用性可能會變動,請隨時查看 Z.AI 的文件獲取最新資訊。
- 範例模型 ID 包括
glm-5.1,glm-5,glm-5v-turbo,glm-4.7, 和glm-4.6。 - 關於 provider 的詳細資訊,請參考 /providers/zai。
想要更快速地完成設定嗎?你可以直接詢問我們的 AI Setup Assistant。
OpenClaw Expert
還是卡住了?
如果這篇文件沒有解決你的情境,直接問 OpenClaw Expert,拿到可執行步驟。