Adds support for running embeddings locally using node-llama-cpp, eliminating
the need for OpenAI API keys when using the memory-lancedb plugin.
Changes:
- Add embedding.provider config: 'openai' | 'local' (default: 'openai')
- Make embedding.apiKey optional when using local provider
- Add embedding.local.modelPath for custom GGUF model paths
- Add embedding.local.modelCacheDir for model caching
- Default local model: embeddinggemma-300M-Q8_0.gguf (768-dim vectors)
- Add node-llama-cpp as optional peer dependency
- Port local embedding logic from core memorySearch implementation
- Maintain backwards compatibility (existing configs work unchanged)
Usage:
embedding:
provider: local
# Optional custom model:
local:
modelPath: hf:ggml-org/embeddinggemma-300M-GGUF/embeddinggemma-300M-Q8_0.gguf
|
||
|---|---|---|
| .. | ||
| config.ts | ||
| index.test.ts | ||
| index.ts | ||
| openclaw.plugin.json | ||
| package.json | ||