From ccb01890aa4ab27776100fd796c3897b42ecb636 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Tue, 28 Apr 2026 00:45:20 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@2057713af54bcd6e88115a5e631b14862060ec8d --- .openclaw-sync/source.json | 4 +- docs/plugins/memory-lancedb.md | 79 ++++++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index e87955d44..531740a25 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "b294f7c467632c19bf3b84f4d5faa00bdd5ccd50", - "syncedAt": "2026-04-28T00:43:19.220Z" + "sha": "2057713af54bcd6e88115a5e631b14862060ec8d", + "syncedAt": "2026-04-28T00:43:47.078Z" } diff --git a/docs/plugins/memory-lancedb.md b/docs/plugins/memory-lancedb.md index 6e1933fc2..9bce67a12 100644 --- a/docs/plugins/memory-lancedb.md +++ b/docs/plugins/memory-lancedb.md @@ -35,7 +35,7 @@ slot with `plugins.slots.memory = "memory-lancedb"`. Companion plugins such as enabled: true, config: { embedding: { - apiKey: "${OPENAI_API_KEY}", + provider: "openai", model: "text-embedding-3-small", }, autoRecall: true, @@ -59,12 +59,12 @@ Then verify the plugin is loaded: openclaw plugins list ``` -## Ollama embeddings +## Provider-backed embeddings -`memory-lancedb` calls embeddings through an OpenAI-compatible embeddings API. -For Ollama embeddings, use the Ollama `/v1` compatibility endpoint here. This -is only for embeddings; the Ollama chat/model provider uses the native Ollama -API URL documented in [Ollama](/providers/ollama). +`memory-lancedb` can use the same memory embedding provider adapters as +`memory-core`. Set `embedding.provider` and omit `embedding.apiKey` to use the +provider's configured auth profile, environment variable, or +`models.providers..apiKey`. ```json5 { @@ -77,8 +77,66 @@ API URL documented in [Ollama](/providers/ollama). enabled: true, config: { embedding: { - apiKey: "ollama", - baseUrl: "http://127.0.0.1:11434/v1", + provider: "openai", + model: "text-embedding-3-small", + }, + autoRecall: true, + }, + }, + }, + }, +} +``` + +This path works with provider auth profiles that expose embedding credentials. +For example, GitHub Copilot can be used when the Copilot profile/plan supports +embeddings: + +```json5 +{ + plugins: { + slots: { + memory: "memory-lancedb", + }, + entries: { + "memory-lancedb": { + enabled: true, + config: { + embedding: { + provider: "github-copilot", + model: "text-embedding-3-small", + }, + }, + }, + }, + }, +} +``` + +OpenAI Codex / ChatGPT OAuth (`openai-codex`) is not an OpenAI Platform +embeddings credential. For OpenAI embeddings, use an OpenAI API key auth profile, +`OPENAI_API_KEY`, or `models.providers.openai.apiKey`. OAuth-only users can use +another embedding-capable provider such as GitHub Copilot or Ollama. + +## Ollama embeddings + +For Ollama embeddings, prefer the bundled Ollama embedding provider. It uses the +native Ollama `/api/embed` endpoint and follows the same auth/base URL rules as +the Ollama provider documented in [Ollama](/providers/ollama). + +```json5 +{ + plugins: { + slots: { + memory: "memory-lancedb", + }, + entries: { + "memory-lancedb": { + enabled: true, + config: { + embedding: { + provider: "ollama", + baseUrl: "http://127.0.0.1:11434", model: "mxbai-embed-large", dimensions: 1024, }, @@ -106,6 +164,11 @@ parameter, while others ignore it and always return `number[]` vectors. `memory-lancedb` therefore omits `encoding_format` on embedding requests and accepts either float-array responses or base64-encoded float32 responses. +If you have a raw OpenAI-compatible embeddings endpoint that does not have a +bundled provider adapter, omit `embedding.provider` (or leave it as `openai`) and +set `embedding.apiKey` plus `embedding.baseUrl`. This preserves the direct +OpenAI-compatible client path. + Set `embedding.dimensions` for providers whose model dimensions are not built in. For example, ZhiPu `embedding-3` uses `2048` dimensions: