Switch from fastembed to Python sentence-transformers for embedding

ort (ONNX Runtime) has no prebuilt binaries for aarch64-musl.
Use a Python subprocess with sentence-transformers instead:
- scripts/embed.py: reads JSON stdin, outputs embeddings
- kb.rs: calls Python script via tokio subprocess
- Dockerfile: install python3 + sentence-transformers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 08:31:31 +00:00
parent 8483359cbc
commit fbf636868c
5 changed files with 86 additions and 766 deletions

View File

@@ -26,4 +26,3 @@ uuid = { version = "1", features = ["v4"] }
anyhow = "1"
mime_guess = "2"
nix = { version = "0.29", features = ["signal"] }
fastembed = { version = "5", default-features = false, features = ["hf-hub", "hf-hub-rustls-tls", "ort-download-binaries-rustls-tls"] }