AI.Embeddings.Script (fnord v0.9.27)
View SourceManages the standalone embed.exs script that runs the local embedding model.
The script is stored as a module attribute and written to ~/.fnord/embed.exs on first use. It uses Bumblebee with all-MiniLM-L12-v2 (384-dim vectors, mean pooling) and supports both single-input and pooled JSONL streaming modes.
Summary
Functions
Ensures the embed.exs script and its shell wrapper exist on disk. Writes them if missing or if the on-disk content differs from the compiled-in version (i.e. after an upgrade).
Returns the path to the embed.exs script under ~/.fnord/.
Returns the path to the embed.sh wrapper script under ~/.fnord/.
Functions
@spec ensure_scripts!() :: :ok
Ensures the embed.exs script and its shell wrapper exist on disk. Writes them if missing or if the on-disk content differs from the compiled-in version (i.e. after an upgrade).
@spec script_path() :: String.t()
Returns the path to the embed.exs script under ~/.fnord/.
@spec wrapper_path() :: String.t()
Returns the path to the embed.sh wrapper script under ~/.fnord/.