openclaw 使用 ollama gpt-oss:20b 單機模型

openclaw 使用 ollama gpt-oss:20b 單機模型

設定方式 C:\Users\[使用者名稱]\.openclaw\openclaw.json 加入設定

"agents": {
  "defaults": {
    "model": {
      "primary": "ollama/gpt-oss:20b",
      "fallbacks": []
    },
    "models": {
    },
    "workspace": "C:\\Users\\[使用者名稱]\\.openclaw",
    "compaction": {
      "mode": "safeguard"
    },
    "maxConcurrent": 4,
    "subagents": {
      "maxConcurrent": 8
    }
  }
},
"models": {
  "providers": {
    "ollama": {
      "baseUrl": "http://127.0.0.1:11434/v1",
      "apiKey": "ollama-local",
      "api": "openai-completions",
      "models": [
        {
          "id": "gpt-oss:20b",
          "name": "gpt-oss:20b",
          "reasoning": true,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "maxTokens": 81920
        }
      ]
    }
  }
},

開啟 ollama 與 重啟 openclaw 應該就能正確運作了

觀察方式 送出訊息後 觀察 GPU 是否有正常跑高 即可確認是否為正確

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *