Skip to content

Add dedicated factory methods for Google Gemini vectorizer#545

Merged
bevzzz merged 1 commit intomainfrom
feat/multi2vec-google-gemini
Mar 10, 2026
Merged

Add dedicated factory methods for Google Gemini vectorizer#545
bevzzz merged 1 commit intomainfrom
feat/multi2vec-google-gemini

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Mar 10, 2026

This PR introduces dedicated factory method Multi2VecGoogleVectorizer::gemini that provides configuration options tailored to the Gemini API.

Additionally, we rename -Google methods to -GoogleVertex (similarly to how we have it in the generate/ module) and deprecate the older methods.

There's a slight breaking change in that Multi2VecGoogleVectorizer::vertex accepts VertexBuilder and not the base Builder. This is necessary to expose apiEndpoint setter for Vertex, but not for Gemini configuration. Users that use the lambda shorthand should not be affected at all; only explicit use of the builder type would need to be updated, e.g.:

Function<Multi2VecGoogleVectorizer.Builder, ObjectBuilder<Multi2VecGoogleVectorizer>> fn = opt -> opt.dimensions(768);
VectorConfig.multi2vecGoogle(fn); // Doesn't compile
VectorConfig.multi2vecGoogleVertex(fn); // Doesn't compile
VectorConfig.muli2vecGoogleVertex(builder -> builder.dimensions(768)); // Compiles as before

@bevzzz bevzzz requested a review from antas-marcin March 10, 2026 08:35
Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz merged commit 2e0c086 into main Mar 10, 2026
20 of 25 checks passed
@bevzzz bevzzz deleted the feat/multi2vec-google-gemini branch March 10, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants