-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate test application with pgvector and spring-ai if pgvector is selected #1420
Conversation
…vector are selected
Depends on spring-io/initializr#1512 and testcontainers/testcontainers-java#8401 |
spring-io/initializr#1512 is merged :) |
...pring/start/site/extension/dependency/postgresql/PgVectorProjectGenerationConfiguration.java
Outdated
Show resolved
Hide resolved
looks like it depends on initializr release to compile. I wonder if once it compiles this can be available, it will be safe because the testcontainers support is under a condition and compose will just work. Both PRs mentioned here were merged. Otherwise, those are the steps to make this available:
|
We don't need to release initialzr, as start.spring.io uses the snapshot dependency of it. So, this PR adds code which starts a PGvector testcontainer / docker compose service. But there's nothing in Spring AI which reacts to those services, right? So while this is nice for users, they still need to provide some application properties to get this running out of the box. @markpollack What do you think of adding service connection support to Spring AI for such cases? |
@mhalbritter PGVector support in spring-ai depends on JdbcTemplateAutoconfiguration. So, I think it should be already covered with this PR. We are discussing support for other vector databases in spring-projects/spring-ai#151 |
Ah, i missed that. You're using the label to specify the container to be a postgres container, that's why it works. |
Testcontainers 1.19.7 has been released and now pgvector can be used as simple as |
Hi @mhalbritter, tasks listed in this comment are done. Looking forward to see this merged :) |
…ctor is selected" See gh-1420
Thanks a lot Eddú! |
pgvector/pgvector
image is based onpostgres
image but doesn't providelatest
tag.