Documentation
¶
Overview ¶
Package embedding provides text embedding generation for memory vector search.
Index ¶
Constants ¶
View Source
const DefaultDimension = 768
DefaultDimension is the default embedding dimensionality (nomic-embed-text).
View Source
const DefaultTimeout = 30
DefaultTimeout is the default HTTP timeout in seconds for embedding API calls.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OllamaConfig ¶
OllamaConfig configures the Ollama embedding provider.
type Provider ¶
type Provider interface {
// Embed generates an embedding vector for a single text input.
Embed(ctx context.Context, text string) ([]float32, error)
// EmbedBatch generates embedding vectors for multiple text inputs.
EmbedBatch(ctx context.Context, texts []string) ([][]float32, error)
// Dimension returns the dimensionality of the generated embeddings.
Dimension() int
}
Provider generates vector embeddings from text.
func NewNoopProvider ¶
NewNoopProvider creates a no-op embedding provider.
func NewOllamaProvider ¶
func NewOllamaProvider(cfg OllamaConfig) Provider
NewOllamaProvider creates an embedding provider that calls Ollama.
Click to show internal directories.
Click to hide internal directories.