Skip to main content

Module embed

Module embed 

Source
Expand description

Embedding-backend construction. Memory is the first server-side consumer of kyma-embed; the backend (an ONNX model for fastembed) is built once and shared process-wide via a OnceCell so the model loads at most once.

Functionsยง

build_embedding_backend
Construct an embedding backend from config. Only providers whose kyma-embed feature is enabled are available; others return an error.
shared_embedding
The process-wide embedding backend, lazily built from EmbeddingConfig::from_env on first use.