-
Notifications
You must be signed in to change notification settings - Fork 5
feat(java): add vector search #14
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
Conversation
…ps into docsp-54427-vector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % a few nits
server/java-spring/src/main/java/com/mongodb/samplemflix/config/DatabaseVerification.java
Outdated
Show resolved
Hide resolved
server/java-spring/src/main/java/com/mongodb/samplemflix/service/MovieServiceImpl.java
Outdated
Show resolved
Hide resolved
| * @throws IOException If there's an error calling the API | ||
| * @throws InterruptedException If the HTTP request is interrupted | ||
| */ | ||
| private List<Double> generateVoyageEmbedding(String text, String apiKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why you used this HTTP request strategy vs the code we have in the vector search docs: https://www.mongodb.com/docs/atlas/atlas-vector-search/create-embeddings/?embedding-model=voyage&data-source=existing&language-no-interface=java-sync#define-a-method-to-generate-vector-embeddings.-1. Both work, but I'm curious for my own knowledge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because Augment really really wanted to keep reverting back to HTTP requests 😓 thanks for calling this out. I've updated to reflect the docs' strategy
Co-authored-by: shuangela <[email protected]>
Adds vector-search endpoint:
GET /api/movies/vector-search- Search movies using MongoDB Vector Search with VoyageAI embeddingsVOYAGE_API_KEYto your.envThe application will start on
http://localhost:3001http://localhost:3001/swagger-ui.html