YouTube Video RAG Search
The YoutubeVideoSearchTool
is designed to perform a RAG (Retrieval-Augmented Generation) search within the content of a Youtube video.
YoutubeVideoSearchTool
We are still working on improving tools, so there might be unexpected behavior or changes in the future.
Description
This tool is part of the crewai_tools
package and is designed to perform semantic searches within Youtube video content, utilizing Retrieval-Augmented Generation (RAG) techniques.
It is one of several “Search” tools in the package that leverage RAG for different sources.
The YoutubeVideoSearchTool allows for flexibility in searches; users can search across any Youtube video content without specifying a video URL,
or they can target their search to a specific Youtube video by providing its URL.
Installation
To utilize the YoutubeVideoSearchTool
, you must first install the crewai_tools
package.
This package contains the YoutubeVideoSearchTool
among other utilities designed to enhance your data analysis and processing tasks.
Install the package by executing the following command in your terminal:
Example
To integrate the YoutubeVideoSearchTool into your Python projects, follow the example below. This demonstrates how to use the tool both for general Youtube content searches and for targeted searches within a specific video’s content.
Arguments
The YoutubeVideoSearchTool accepts the following initialization arguments:
youtube_video_url
: An optional argument at initialization but required if targeting a specific Youtube video. It specifies the Youtube video URL path you want to search within.
Custom model and embeddings
By default, the tool uses OpenAI for both embeddings and summarization. To customize the model, you can use a config dictionary as follows:
Was this page helpful?