Ash FrameworkAF
Ash Framework4mo ago
7 replies
theron

no function clause matching in Pgvector.new/1

This is what I'm doing:

case Req.post(url, json: body) do
      {:ok, %{status: 200, body: %{"embeddings" => embeddings}}} ->
        binary_embeddings =
          embeddings
          |> Enum.map(fn %{"values" => values} ->
            # Create Pgvector from the float values and convert to binary
            values
            |> Pgvector.new()
            |> Pgvector.to_binary()
          end)

        {:ok, binary_embeddings}


With this
vectorize do
    attributes description: :description_vector

    embedding_model CoffeeViewer.EmbeddingModels.Gemini
    strategy :after_action
  end
Solution
i think pg vector package is the issue
Was this page helpful?