Documentation
¶
Overview ¶
Package embed provides Ken's pluggable embedding SPI for semantic search. It ships an OpenAI-compatible HTTP provider and a deterministic offline hash provider (for tests / air-gapped use). Embeddings are OFF unless KEN_EMBED_* is configured; the store computes cosine KNN in Go (brute-force), so no SQLite extension is required.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Embedder ¶
type Embedder interface {
Embed(ctx context.Context, texts []string) ([][]float32, error)
Dimension() int
ID() string // stable model id, stored alongside each vector
}
Embedder turns text into vectors. Implementations must return one vector per input, in order, each of length Dimension().
type HTTPEmbedder ¶
type HTTPEmbedder struct {
// contains filtered or unexported fields
}
func (*HTTPEmbedder) Dimension ¶
func (h *HTTPEmbedder) Dimension() int
func (*HTTPEmbedder) ID ¶
func (h *HTTPEmbedder) ID() string
type HashEmbedder ¶
type HashEmbedder struct{ Dim int }
func (HashEmbedder) Dimension ¶
func (h HashEmbedder) Dimension() int
func (HashEmbedder) ID ¶
func (h HashEmbedder) ID() string
Click to show internal directories.
Click to hide internal directories.