embed

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 13 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL