Ollama 集成
使用 Ollama 和 OpenClaw 运行本地 AI 模型。无需 API 密钥。
概述
Ollama 让你在自己的硬件上本地运行 AI 模型。无需 API 密钥,完全隐私。
可用模型
- Llama 3.1 — Meta 的开源模型
- Mistral — 快速高效
- Qwen 2.5 — 阿里巴巴的多语言模型
- Deepseek — 强大的编程模型
- Phi-3 — 微软的紧凑模型
安装 Ollama
# macOS / Linux
curl -fsSL https://ollama.com/install.sh | sh
# 拉取模型
ollama pull llama3.1配置
{
"agents": {
"default": {
"provider": "ollama",
"model": "llama3.1"
}
}
}环境变量
export OLLAMA_BASE_URL="http://localhost:11434"