Sign inSign up

nacrecontextlayer/nacre-embedding-adapter

By nacrecontextlayer

•Updated 3 minutes ago

Nacre embedding adapter: one OpenAI-shaped /embeddings and /rerank in front of hosted vendors.

Image
Machine learning & AI
Data science
Databases & storage
0

725

nacrecontextlayer/nacre-embedding-adapter repository overview

⁠Nacre — embedding adapter

One protocol in, several vendors out. POST /embeddings takes exactly what the Nacre⁠ worker and search path already send — {"model": …, "input": […]} — and answers exactly what they already read; POST /rerank speaks Text Embeddings Inference's shape for the same reason. It exists so the core does not learn three protocols: anything OpenAI-shaped already works by pointing an embedding_providers row's endpoint at it, and this adds the vendors that do not, with a credential, without either reaching Postgres.

Part of the open core — github.com/nacre-work/nacre⁠, Apache 2.0. Standard library only.

⁠Nothing has a default

  • No route exists unless NACRE_EMBED_ROUTES names it.
  • An unrouted model is refused by name. There is no fallback vendor, because a fallback is a decision made on the operator's behalf about where their documents go.
  • With no routes at all the process refuses to start.

Routing a model here means the text of your documents leaves your installation. That is the trade, and it is stated in those words in docs/config.md⁠. The adapter is absent from the airgapped Compose profile rather than disabled in it.

⁠Configuration

variablemeaning
NACRE_EMBED_ROUTESmodel=vendor or model=vendor:upstream-model, comma-separated. A vendor's own spelling — bge-m3=cloudflare:@cf/baai/bge-m3 — lets an installation move onto a vendor's copy of identical weights without a reindex
NACRE_EMBED_OPENAI_COMPATIBLE_ENDPOINT, NACRE_EMBED_OPENAI_COMPATIBLE_API_KEY[_FILE]OpenAI, Together, DeepInfra, vLLM, a self-hosted TEI
NACRE_EMBED_CLOUDFLARE_ACCOUNT, NACRE_EMBED_CLOUDFLARE_API_KEY[_FILE]Workers AI
NACRE_EMBED_GOOGLE_API_KEY[_FILE]Generative Language API
NACRE_EMBED_VOYAGE_API_KEY[_FILE]Voyage AI
NACRE_RERANK_VENDOR, NACRE_RERANK_MODELone cross-encoder: cloudflare, cohere, jina or voyage, with its own NACRE_RERANK_<VENDOR>_API_KEY[_FILE]
PORT8091

_API_KEY and _API_KEY_FILE together is refused rather than resolved by precedence. The rerank credential is separate from the embedding one even where the vendor is the same. The full table is in the adapter's README⁠.

Tags: {version} and latest, amd64 and arm64, always the same version as nacre. ghcr.io/nacre-work/nacre-embedding-adapter is the canonical address; this repository is a mirror pushed by the same build at the same tags.

nacre.work⁠ · Configuration⁠ · Releases⁠

Tag summary

Content type

Image

Digest

sha256:aad7f8e20…

Size

41.1 MB

Last updated

3 minutes ago

docker pull nacrecontextlayer/nacre-embedding-adapter