AI.Embeddings.Migration (fnord v0.9.34)
View SourceDetects and performs one-time migration from OpenAI embeddings to the local embedding model. Migration is triggered when stored embedding vectors have a different dimensionality than the current model expects.
The migration deletes all stored embeddings so they can be regenerated by
the background indexers or a manual fnord index run.
Summary
Functions
Checks whether migration is needed and performs it if so. Returns :ok in all cases (migration is best-effort).
Functions
@spec maybe_migrate(:ask | :index | :read_only) :: :ok
Checks whether migration is needed and performs it if so. Returns :ok in all cases (migration is best-effort).
context controls the user-facing messaging only:
:ask- rebuild happens in the background while ask runs:index- full foreground reindex is about to start:read_only- read-only command (search, conversations, memory); no background indexer is running, user must runfnord index