Documentation
¶
Overview ¶
Package provider defines the LLM and embedding interfaces mneme depends on, plus implementations (an OpenAI-compatible HTTP client in provider/openai and deterministic fakes in provider/fake).
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)
Dim() int
}
Embedder turns text into vectors. Embed is batch: it accepts many texts and returns one vector per input, in order.
type LLM ¶
type LLM interface {
// Complete returns the assistant text for the given system+user prompt.
// When jsonObject is true the provider requests a JSON object response
// (response_format) so the model is steered toward valid JSON; callers
// must still parse defensively.
Complete(ctx context.Context, system, user string, jsonObject bool) (string, error)
}
LLM is the text-completion surface the extraction pipeline needs.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fake provides deterministic, offline implementations of provider.LLM and provider.Embedder for unit tests.
|
Package fake provides deterministic, offline implementations of provider.LLM and provider.Embedder for unit tests. |
|
Package openai is a minimal OpenAI-compatible HTTP client implementing provider.LLM and provider.Embedder over net/http with no SDK dependency.
|
Package openai is a minimal OpenAI-compatible HTTP client implementing provider.LLM and provider.Embedder over net/http with no SDK dependency. |
Click to show internal directories.
Click to hide internal directories.