analyze_video, which answers a natural-language question about a video using the Pegasus video understanding model, and embed_text, which generates a multimodal embedding with the Marengo model that lives in the same latent space as TwelveLabs video, audio and image embeddings (useful for searching a video corpus by text).
Prerequisites
You need to install thetwelvelabs library and an API key which can be obtained from the TwelveLabs dashboard.
TWELVELABS_API_KEY and OPENAI_API_KEY environment variables.
Example
The following agent will use TwelveLabs to answer a question about a video and to generate a text embedding.cookbook/91_tools/twelvelabs_tools.py