Documentation
¶
Overview ¶
Package embed provides Embedder implementations for OpenAI-compatible (`/v1/embeddings`) and Ollama (`/api/embeddings`) endpoints, plus a factory that dispatches by configured provider and wraps remote providers with a rate.Limiter (paralleling the chat-runner factory).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg model.EmbeddingConfig) (llm.Embedder, error)
New constructs an Embedder from cfg. Returns an error when Provider is unrecognised or required fields (Model, API key for remote providers) are missing. Remote providers ("openai") are wrapped with a rate.Limiter using cfg.RateLimitRPS or a conservative provider default. The batch size flows from cfg.BatchSize (zero → provider default) so command-line flags / config overrides reach the transport without env-var sniffing in the package.
Types ¶
This section is empty.