Skip to content

Add text2vec-digitalocean vectorizer module#570

Open
mpartipilo wants to merge 2 commits into
mainfrom
text2vec-digitalocean
Open

Add text2vec-digitalocean vectorizer module#570
mpartipilo wants to merge 2 commits into
mainfrom
text2vec-digitalocean

Conversation

@mpartipilo
Copy link
Copy Markdown
Contributor

@mpartipilo mpartipilo commented May 18, 2026

Summary

  • Adds support for the new text2vec-digitalocean vectorizer module, mirroring text2vec-mistral (shared shape: model + baseURL + vectorizeClassName)
  • Registers the new Kind.TEXT2VEC_DIGITALOCEAN enum value and Gson type adapter in VectorConfig
  • Exposes four factory overloads (text2vecDigitalOcean(), with fn, with name, with name + fn) and typed accessor helpers (isText2VecDigitalOcean / asText2VecDigitalOcean)

API surface added

  • Text2VecDigitalOceanVectorizer — record with Lombok-style builder, baseUrl, model, sourceProperties, vectorIndex, quantization
  • VectorConfig.Kind.TEXT2VEC_DIGITALOCEAN — enum entry mapping to "text2vec-digitalocean"
  • VectorConfig.text2vecDigitalOcean(...) — four factory overloads
  • VectorConfig.isText2VecDigitalOcean() / asText2VecDigitalOcean() — typed cast helpers

Test plan

  • 2 unit test cases added to JSONTest asserting JSON serialization: default (empty config) and all-parameters-set (model + baseURL + sourceProperties)
  • All 220 tests in JSONTest pass (Tests run: 220, Failures: 0, Errors: 0)
  • No unrelated files modified

Review-feedback changes

Second commit (c4eaf1b8) merges two of the original test cases per @bevzzz's review — the model + baseURL case and the sourceProperties case both checked the same thing (a parameter serializes correctly when set), so they're now one combined case that exercises all parameters at once. The empty/default case stays because it covers a structurally different payload. This matches the leaner pattern used by other vectorizers in the same file.

Closes #569

Sibling PR (Python): weaviate/weaviate-python-client#2041

🤖 Generated with Claude Code

Adds support for the new text2vec-digitalocean vectorizer. The
module shape mirrors text2vec-mistral exactly (model + baseURL +
vectorizeClassName), so the existing serialization path is reused
unchanged.

Closes #569

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@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

@mpartipilo mpartipilo marked this pull request as ready for review May 18, 2026 12:08
Comment thread src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java
Per @bevzzz on #570: the `model + baseURL` test and the
`sourceProperties` test both check the same thing — that a parameter
is serialized correctly when set. Combine them into a single case
that exercises all parameters at once.

The empty/default test stays because it covers a structurally
different scenario (the default `vectorizeClassName: false` payload
with no other fields). This matches the leaner pattern used by other
vectorizers in the same file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mpartipilo mpartipilo requested a review from bevzzz May 18, 2026 12:55
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.

Add support for text2vec-digitalocean module

2 participants