Ash FrameworkAF
Ash Framework7mo ago
23 replies
blade

Ash ai error when generating embddding

When trying to use Ash AI to generate a embedding, I got the error:

* (Oban.CrashError) (throw) {DBConnection, #Reference<0.1746484685.788004865.129140>, #Ash.Changeset<domain: Qst.Templates, action_type: :update, action: :ash_ai_update_embeddings, attributes: %{full_text_vector: Ash.Vector.new([0.007031387183815241, -0.009794930927455425, ...]), updated_at: ~U[2025-06-21 06:34:27.031518Z]}, relationships: %{}, errors: [%Ash.Error.Unknown.UnknownError{error: "** (FunctionClauseError) no function clause matching in Pgvector.new/1", field: nil, value: nil, splode: Ash.Error, bread_crumbs: [], vars: [], path: [], stacktrace: #splode.Stacktrace<>, class: :unknown}], data: %Qst.Templates.QuestTemplate{id: "97eee691-64df-47e0-900a-9e8eaff83a25", name: "Dragon Slayer", description: "Epic dragon quest", inserted_at: ~U[2025-06-21 06:34:26.256243Z], updated_at: ~U[2025-06-21 06:34:26.256243Z], creator_id: "0a622c8d-6d03-4ca6-bef9-84795f3d8d7d", full_text_vector: #Ash.NotLoaded<:attribute, field: :full_text_vector>, task_templates: #Ash.NotLoaded<:relationship, field: :task_templates>, creator: #Ash.NotLoaded<:relationship, field: :creator>, meta: #Ecto.Schema.Metadata<:loaded, "quest_templates">}, context: %{changed?: true}, valid?: false>}

It seems the embedding is returned correctly but can't convert to Pgvector. Does anyone has similar issue? Thanks a lot.
Was this page helpful?