Using Pgvector and Ash.Vector
Greetings!
I have a few Ecto schemas using
Pgvector.Ecto.Type
. I've been attempting to slowly move them over to Ash resources using the Ash.Type.Vector
but I've been unable to get both extensions to coexist.
I tried globally defining both: Pgvector.extensions() ++ [AshPostgres.Extensions.Vector] ++ Ecto.Adapters.Postgres.extensions()
, but depending on that list order one or the other breaks.
I also tried matching on type to get around it in a custom extension, which works for encoding:
But I've found no way to determine which type to return on decoding:
I've decided the only thing to do is replace all instances of Pgvector.Ecto.Type with Ash.Type.Vector in one fell swoop, so only the Ash type is in use.
Has anybody run into this? I wanted to ask before I pull the "destroy all" lever on Pgvector.2 Replies
🤔 yeah I think the only other option would be to use a separate repo for your Ash resources potentially
Cool. I figured. Thanks!