AI.Embeddings.Script (fnord v0.9.25)

View Source

Manages 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

ensure_scripts!()

@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).

script_path()

@spec script_path() :: String.t()

Returns the path to the embed.exs script under ~/.fnord/.

wrapper_path()

@spec wrapper_path() :: String.t()

Returns the path to the embed.sh wrapper script under ~/.fnord/.