Add support for self-hosted OpenAI-compatible embedding servers:
- Add `embedding.baseUrl` config option for custom endpoint URL
- Add `embedding.dimensions` config option to override vector dimensions
- Remove model enum restriction to allow any model name
- Update Embeddings class to pass baseURL to OpenAI client
This enables users to run local embedding models (e.g., via llama.cpp,
text-embeddings-inference, or other OpenAI-compatible servers) instead
of requiring the OpenAI API.
Example config:
```json
{
"embedding": {
"apiKey": "not-needed",
"baseUrl": "http://localhost:8080/v1",
"model": "my-local-model",
"dimensions": 4096
}
}
```
|
||
|---|---|---|
| .. | ||
| clawdbot.plugin.json | ||
| config.ts | ||
| index.test.ts | ||
| index.ts | ||
| package.json | ||