feat(config): add multi2vec-twelvelabs vectorizer support (#2113) - #2117
Open
Anai-Guo wants to merge 1 commit into
Open
feat(config): add multi2vec-twelvelabs vectorizer support (#2113)#2117Anai-Guo wants to merge 1 commit into
Anai-Guo wants to merge 1 commit into
Conversation
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 |
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
Author
|
I agree with the Weaviate Contributor License Agreement. |
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.
Closes #2113.
Adds client-side support for the
multi2vec-twelvelabsvectorizer shipping with Weaviate v1.37+.What's here
Vectorizers.MULTI2VEC_TWELVELABSenum member (+ docstring entry)_Multi2VecTwelvelabsConfiginconfig_vectorizers.py—baseURL/modelon top of_Multi2VecBase, with the usualAnyHttpUrl→ string coercion in_to_dict()Configure.Vectors.multi2vec_twelvelabs(...)inconfig_vectors.pytest_config.pycase asserting the serialized payloadThe settings surface matches the issue (
model, defaultmarengo3.0;baseURL) and the server module'sclass_settings.go, which registers exactlytextFieldsandimageFieldsas its multimodal fields — so no video/audio field parameters are exposed here.Serialized payload for
multi2vec_twelvelabs(name="t", model="marengo3.0", base_url="https://api.twelvelabs.io/v1.3", image_fields=[Multi2VecField(name="img", weight=0.7)], text_fields=["txt"]):{ "vectorizer": { "multi2vec-twelvelabs": { "imageFields": ["img"], "textFields": ["txt"], "baseURL": "https://api.twelvelabs.io/v1.3", "model": "marengo3.0", "weights": {"imageFields": [0.7]} } }, "vectorIndexType": "hnsw" }Scope notes
Following the precedent of #1977 (
multi2vec_google_gemini), this only adds the module to the currentConfigure.Vectorssurface — not to the deprecatedConfigure.Vectorizer/Configure.NamedVectorssurfaces. Happy to add those, andocs/changelog.rstentry, or anintegration/test_vectors.pycase if you'd like them in this PR.Verification
Ran the unit suite locally against this branch (Python 3.12, Windows):
test/collection/test_config.py: 191 passed onmain→ 192 passed with this change (the new case).test/: 373 passed / 13 failed onmain→ 374 passed / 13 failed with this change — the same 13 pre-existing failures (test_util.pyb64 image/file fixtures,test_timeout.py, and two input-validation cases), all unrelated to this change and unaffected by it.AttributeError: type object '_Vectors' has no attribute 'multi2vec_twelvelabs'.ruff==0.14.7(reporuff.toml):format --checkreports 3 files already formatted;checkpasses.flake8==7.3.0with the pre-commit plugin set (bugbear / comprehensions / builtins / docstrings / pydoclint): clean on both changed source files.🤖 Generated with Claude Code