"ERROR 42704 (undefined_object) type "vector" does not exist" during migration.
Hello, has someone tried the vectorization on a resource? I encounter a migration error problem.
Current setup for vectorization of
Post
resource:
1. First, created setup_vectorization.ex
in folder lib
2. modify Post
resource to add clause vectorize
, ref: vectorization
The document doesn't say about mix ash.codegen xxx
, but it is needed.
Then I run mix ash.migrate
, it shows error: ERROR 42704 (undefined_object) type "vector" does not exist
.
The generated migration file is:
Is there some step is missing? ❓10 Replies
What does your repo module look like?
My repo module is:
Add vector to the list of extensions
Solution
And then delete the migrations and snapshots you just generated
GitHub
ash_ai/test/support/test_repo.ex at main · ash-project/ash_ai
Structured outputs, vectorization and tool calling for your Ash application - ash-project/ash_ai
Like that
The problem still exist:
my current postgres is defined as:
I may find the solution, it seems it is now related how to setup the environment. I will update it
You can use the pgvector image
https://hub.docker.com/r/pgvector/pgvector
Thanks a lot, Zach 🙂 . I am newboo to the LLM domain, I though pgvector is just some parameter setting on existing postgres db. Thanks a lot for your patience.