feat: add TwelveLabs Marengo embedder for cross-modal video/text search#1936
Open
mohit-twelvelabs wants to merge 1 commit into
Open
feat: add TwelveLabs Marengo embedder for cross-modal video/text search#1936mohit-twelvelabs wants to merge 1 commit into
mohit-twelvelabs wants to merge 1 commit into
Conversation
Signed-off-by: Mohit Varikuti <[email protected]>
mohit-twelvelabs
force-pushed
the
feat/twelvelabs-integration
branch
from
June 24, 2026 23:02
caed0f7 to
1320dff
Compare
Author
|
Pushed
The embedder import stays lazy ( |
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.
Hi! I'm Mohit, I work at TwelveLabs (@mohit-twelvelabs).
What this adds
A new opt-in helper,
docarray.utils.twelvelabs.TwelveLabsEmbedder, that populates theembeddingfield ofVideoDoc(and text queries) using TwelveLabs Marengo multimodal embeddings.Marengo maps text and video into the same 512-dimensional vector space, so a text-query embedding can be compared directly against video embeddings. That makes it a natural fit for DocArray's
find/ document-index cross-modal search:Why it helps this project
DocArray already models video as a first-class type (
VideoDoc) and ships vector-search backends, but leaves embedding generation to the user. This wires up a production multimodal video embedder so users can go fromVideoDocto searchable vectors without leaving DocArray, and unlocks true cross-modal (text-to-video) retrieval.Opt-in / non-breaking
twelvelabsunless you use the helper; it's gated behind a newtwelvelabsextra (pip install "docarray[twelvelabs]") using the sameimport_librarypattern as the other optional integrations.How it was tested
embed_docs, theTextDocquery path, and the missing-URL / missing-key error cases — these run in CI without any credentials.TWELVELABS_API_KEY(skipped when unset). I ran both locally against the real API withtwelvelabs==1.2.8: the text-embedding test and the video-embedding test (Big Buck Bunny sample) both pass and return 512-d vectors.black -S,isort --profile black, andruffare clean on the changed files.You can grab a free API key at https://twelvelabs.io — there's a generous free tier.