feat: add TwelveLabs Marengo embeddings and Pegasus video loader#227
Open
mohit-twelvelabs wants to merge 1 commit into
Open
feat: add TwelveLabs Marengo embeddings and Pegasus video loader#227mohit-twelvelabs wants to merge 1 commit into
mohit-twelvelabs wants to merge 1 commit into
Conversation
Adds a new opt-in @llm-tools/embedjs-twelvelabs package providing: - MarengoEmbeddings: 512-dim multimodal embeddings via the Marengo model - TwelveLabsVideoLoader: a data source that analyses a video with the Pegasus model and loads the description into the RAG pipeline Includes documentation and navigation entries. No existing behaviour is changed.
|
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).
Description
This PR adds a new opt-in package,
@llm-tools/embedjs-twelvelabs, that brings TwelveLabs video understanding to embedJs:MarengoEmbeddings— a drop-in embedding model backed by the Marengo (marengo3.0) multimodal model. Marengo embeds text, image, audio and video into a single shared 512-dimensional latent space, which is a strong fit for RAG over video and mixed-media libraries.TwelveLabsVideoLoader— a data source that analyses a video with the Pegasus video understanding model (it watches the visuals, motion and audio) and loads the resulting natural-language description into the RAG pipeline. This lets you index video content directly from a public URL, with no separate transcription step.It mirrors the existing provider conventions (e.g.
embedjs-openai,embedjs-cohere,embedjs-loader-youtube): same package scaffolding, Nxproject.json,tsconfig/eslintconfig,BaseEmbeddings/BaseLoaderextension, and docs.Why it helps this project: it's the first multimodal/video-native option in embedJs — users can now build RAG apps over video without leaving the framework. It's fully opt-in and non-breaking — a new workspace package with its own dependency; no existing defaults or behaviour change.
Fixes # (no issue)
Type of change
How Has This Been Tested?
Built the package with Nx (
nx build embedjs-twelvelabs) and exercised it against the live TwelveLabs API with a real key:MarengoEmbeddings.getDimensions()returns512;embedQueryandembedDocumentsreturn real 512-dim vectors.TwelveLabsVideoLoaderconstruction,uniqueIdand the chunk generator wiring verified; full Pegasus analysis of a public URL works server-side but is slow, so the request wiring is verified and a full run is left to the reviewer.TWELVELABS_API_KEY).You can grab a free API key at https://twelvelabs.io — there's a generous free tier.
Checklist: