Nous.Memory.Embedding behaviour (nous v0.13.3)
View SourceBehaviour for embedding providers.
Implement this behaviour to use any embedding provider with the memory system. If no embedding provider is configured, the memory system falls back to keyword-only search.
Summary
Functions
Get the embedding dimension for a provider.
Embed a single text using the given provider module and options. Returns {:ok, embedding} or {:error, reason}.
Embed a batch of texts. Falls back to sequential embed/2 calls if embed_batch/2 is not implemented.
Callbacks
Functions
Get the embedding dimension for a provider.
Embed a single text using the given provider module and options. Returns {:ok, embedding} or {:error, reason}.
Embed a batch of texts. Falls back to sequential embed/2 calls if embed_batch/2 is not implemented.