返回顶部
o

ollama-memory-setupOllama内存配置

Sets up local semantic memory search for OpenClaw using Ollama + nomic-embed-text. Use when: (1) memory_search returns 'node-llama-cpp is missing' or 'Local embeddings unavailable' error, (2) user wants local/private embeddings without external API keys (OpenAI, Gemini, Voyage), (3) setting up memory search for the first time on macOS or Linux, (4) node-llama-cpp fails to install or build. Fixes the common node-llama-cpp installation failure by routing through Ollama's OpenAI-compatible embeddin

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
119
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ollama-memory-setup

Ollama 内存设置

使用本地 Ollama 在 OpenClaw 中启用语义内存搜索——无需 API 密钥,无需云端,完全私有。

何时使用?

当 memory_search 抛出以下错误时使用此技能:

  • - node-llama-cpp is missing (or failed to install)
  • Local embeddings unavailable
  • Cannot find package node-llama-cpp
  • optional dependency node-llama-cpp is missing

或者当你希望本地保存嵌入向量而不使用外部 API(OpenAI、Gemini、Voyage)时。

使用方法

自动安装(推荐)

bash

运行设置脚本


bash ~/.openclaw/workspace/skills/ollama-memory-setup/scripts/setup.sh

重启 OpenClaw

openclaw gateway restart

手动安装(逐步操作)

bash

1. 安装 Ollama


brew install ollama # macOS
curl -fsSL https://ollama.com/install.sh | sh # Linux

2. 启动 Ollama(macOS:作为服务运行,自动启动)

brew services start ollama

3. 加载嵌入模型(约 270MB,仅需一次)

ollama pull nomic-embed-text

4. 配置 OpenClaw

openclaw config set agents.defaults.memorySearch.provider ollama openclaw config set agents.defaults.memorySearch.model nomic-embed-text openclaw config set agents.defaults.memorySearch.remote.baseUrl http://localhost:11434 openclaw config set agents.defaults.memorySearch.enabled true

5. 重启

openclaw gateway restart

安装要求

无需 API 密钥。前提条件:

  • - macOS: 已安装 Homebrew(brew --version)
  • Linux: 已安装 curl,推荐使用 systemd
  • Ollama 版本: >= 0.18.0
  • 存储空间: nomic-embed-text 模型约需 300MB

验证

重启后,在新会话中测试:

memory_search(test)

预期响应包含 provider: ollama——而不是 disabled: true。

为什么选择 nomic-embed-text?

nomic-embed-text 是一个专门的嵌入模型(不用于聊天):

  • - 体积小(约 270MB,而聊天模型需要数 GB)
  • 速度快(现代硬件上每次请求约 50ms)
  • 语义搜索质量高
  • 免费、开源(Apache 2.0 许可证)

旧版 Ollama 的替代模型名称:nomic-embed-text:latest

故障排除

常见问题请参阅 references/troubleshooting.md,例如:

  • - Ollama 无法启动
  • 设置后 memory_search 仍处于禁用状态
  • macOS:重启后 Ollama 停止运行
  • Linux:配置 systemd 服务

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ollama-memory-setup-1775946100 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ollama-memory-setup-1775946100 技能

通过命令行安装

skillhub install ollama-memory-setup-1775946100

下载

⬇ 下载 ollama-memory-setup v1.0.0(免费)

文件大小: 5.28 KB | 发布时间: 2026-4-12 10:46

v1.0.0 最新 2026-4-12 10:46
Initial release — enables local semantic memory search with Ollama for OpenClaw.

- Provides a local, private alternative to node-llama-cpp using Ollama’s embedding API.
- Fixes errors when node-llama-cpp is missing or fails by routing embeddings via Ollama and nomic-embed-text.
- No external API keys or cloud required; works fully offline on macOS and Linux.
- Includes both automatic and manual setup instructions.
- Troubleshooting guide provided for common issues.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部