Documentation
¶
Overview ¶
Package embeddings provides a vector embedding interface with implementations for OpenAI, Ollama, and Cohere providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Embedder ¶
type Embedder interface {
GenerateEmbedding(ctx context.Context, input *Input) (*Embedding, error)
}
Embedder generates vector embeddings for text.
func NewNoopEmbedder ¶
func NewNoopEmbedder() Embedder
NewNoopEmbedder returns an Embedder that returns an empty vector and no error. Intended for tests and local development.
type Embedding ¶
type Embedding struct {
GeneratedAt time.Time
SourceText string
Model string
Provider string
Vector []float32
Dimensions int
}
Embedding is the result of embedding a single piece of content. It carries provenance alongside the vector so that re-embedding and ETL pipelines can be driven from the stored result alone.
Click to show internal directories.
Click to hide internal directories.