Include record embedding text on collection show page

This commit is contained in:
Claudio Ortolina
2026-01-19 15:24:29 +00:00
parent 7a6c1ed5ff
commit c1a7c9df44
6 changed files with 48 additions and 1 deletions
+7
View File
@@ -132,6 +132,13 @@ defmodule MusicLibrary.Records.Similarity do
end
end
def get_embedding_text(record_id) do
case Repo.get_by(RecordEmbedding, record_id: record_id) do
nil -> {:error, :not_found}
embedding -> {:ok, embedding.text_representation}
end
end
@doc """
Stores an embedding for a record.
"""