Documentation
¶
Overview ¶
Package fake provides a deterministic Embedder for tests.
Every call with the same text returns the same vector. The mapping is SHA-256 → []float32 by interpreting consecutive 4-byte chunks as uint32 → float in [-1, 1]. With the hash-derived seed it covers the vector cleanly enough for similarity-based tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Embedder ¶
type Embedder struct {
// contains filtered or unexported fields
}
Embedder is a deterministic test embedder.
func (*Embedder) Embed ¶
Embed satisfies embed.Embedder. The fake intentionally ignores the task parameter — the deterministic hash mapping is task-invariant, which keeps service-level tests stable across the task-typed rollout. (Production-quality task differentiation lives in the gemini embedder.)