Add text2vec-digitalocean vectorizer module#340
Open
mpartipilo wants to merge 2 commits into
Open
Conversation
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 #339 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Summary - Weaviate C# Client CoverageSummary
CoverageWeaviate.Client - 39.6%
Weaviate.Client.Analyzers - 0%
Weaviate.Client.VectorData - 50.3%
|
The server requires `model` (e.g. `qwen3-embedding-0.6b`); the factory should require it too rather than silently sending a payload the server will reject. - `VectorizerFactory.Text2VecDigitalOcean(string model, string? baseURL = null, bool? vectorizeCollectionName = null)` — `model` is now required and reordered to the first position, since C# requires non-default params before default params. - `PublicAPI.Unshipped.txt` updated to reflect the new signature (`string! model` first). - `Test_Text2VecDigitalOcean_Omits_Unset_Optionals` renamed to `Test_Text2VecDigitalOcean_Omits_Unset_BaseURL`. It now passes `model` and only asserts that `baseURL` is omitted when unset. The old "model is also omitted when unset" assertion was inconsistent with the spec (`model` is required by the server) and would no longer be reachable through the factory anyway. The `Text2VecDigitalOcean` record's `Model` property remains nullable at the type level (matching the `Text2VecMistral` record); required-ness is enforced at the factory entry point, which is the documented user-facing API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the new
text2vec-digitaloceanvectorizer module. Mirrorstext2vec-mistral(shared shape:model+baseURL+vectorizeClassName).modelis required by the factory — the server requires it, so the public API enforces it at the call site.API surface added
Public types / members (in
PublicAPI.Unshipped.txt):Weaviate.Client.Models.Vectorizer.Text2VecDigitalOceanrecordBaseURL(string?, JSON namebaseURL) — optional; server defaults tohttps://inference.do-ai.runModel(string?) — kept nullable on the record itself (matches theText2VecMistralrecord) so deserialization works; required-ness is enforced at the factory entry pointVectorizeCollectionName(bool?, JSON namevectorizeClassName)Equals,GetHashCode,<Clone>$, equality operators,EqualityContract, copy ctor,PrintMembers,ToString)Weaviate.Client.VectorizerFactory.Text2VecDigitalOcean(string! model, string? baseURL = null, bool? vectorizeCollectionName = null) -> VectorizerConfig—modelis the first parameter and required;baseURLandvectorizeCollectionNamekeep their defaults19 entries total in
PublicAPI.Unshipped.txt.Test plan
dotnet buildclean (0 errors, PublicAPI analyzer satisfied — noRS0016for the new symbols)VectorConfigListTests:Test_Text2VecDigitalOcean_Serializes_BaseURL_And_Model— full-payload serializationTest_Text2VecDigitalOcean_Omits_Unset_BaseURL— verifiesbaseURLis omitted when unset (withmodelalways present)VectorConfigListTestspassReview-feedback changes
Second commit (
0885c2e) makesmodelrequired on the factory, matching the Python sibling PR (weaviate/weaviate-python-client#2041) and the server contract. The PublicAPI signature was updated accordingly, and the second test was renamed/repurposed since "model is omitted when unset" no longer applies (it's required on the factory).Closes #339
Sibling PR (Python): weaviate/weaviate-python-client#2041
🤖 Generated with Claude Code