How to setup "AshPostgres.Extensions.Vector"
I want to use Ash.AI to build RAG feature for my app. Currently, I am not sure how to setup AshPostgres for vector.
According to the document: https://hexdocs.pm/ash_postgres/AshPostgres.Extensions.Vector.html
An extension that adds support for the vector type.
Create a file with these contents, not inside of a module:
I am confused by this:
- which file should I create? a
.exs
or .ex
file ?
- where should I put that file, in the root of my project? or in lib
folder ?
Thanks a lot for your help 🙂5 Replies
Solution
It goes in the
lib/
folder, and in a .ex
fileHi, Zach: so what should be the name of that file? any name? and put will be fine? It seems magic...
Yep, it's weird, but it literally does not matter what it's called
But since it's confusing, once you get it sorted maybe you could make a PR to explain it a bit better for others?
Of course, once I tested. I will record it down.
I just put that stuff in my repo.ex tbh