55 lines
1.2 KiB
Markdown
55 lines
1.2 KiB
Markdown
# TEI - Text Embeddings Inference
|
|
|
|
Lightweight embedding service for Clawdbot memory search.
|
|
|
|
## Overview
|
|
|
|
Runs [HuggingFace Text Embeddings Inference](https://github.com/huggingface/text-embeddings-inference) (TEI) on CPU to provide OpenAI-compatible embeddings for semantic memory search.
|
|
|
|
- **Model:** `sentence-transformers/all-MiniLM-L6-v2` (~90MB, 384 dimensions)
|
|
- **Endpoint:** `http://text-embeddings:8080/v1/embeddings`
|
|
- **No GPU required**
|
|
|
|
## Deploy
|
|
|
|
```bash
|
|
oc new-project tei
|
|
oc apply -f deployment.yaml
|
|
```
|
|
|
|
## Clawdbot Config
|
|
|
|
Add to `~/.clawdbot/clawdbot.json`:
|
|
|
|
```json5
|
|
{
|
|
"agents": {
|
|
"defaults": {
|
|
"memorySearch": {
|
|
"enabled": true,
|
|
"provider": "openai",
|
|
"model": "sentence-transformers/all-MiniLM-L6-v2",
|
|
"remote": {
|
|
"baseUrl": "http://text-embeddings.tei.svc.cluster.local:8080/v1/",
|
|
"apiKey": "not-needed"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## Resources
|
|
|
|
- **Memory:** 512Mi request, 1Gi limit
|
|
- **CPU:** 250m request, 1000m limit
|
|
- **Storage:** 1Gi PVC for model cache
|
|
|
|
## Test
|
|
|
|
```bash
|
|
curl -X POST http://text-embeddings:8080/v1/embeddings \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"input": "Hello world", "model": "sentence-transformers/all-MiniLM-L6-v2"}'
|
|
```
|