From 1766e2733711dfaf8f983f43038ca6c40ced972d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Sun, 3 Mar 2024 22:14:53 -0300 Subject: [PATCH] Adding tool specific docs --- docs/tools/CSVSearchTool.md | 31 ++++++++++++++++++++++ docs/tools/CodeDocsSearchTool.md | 0 docs/tools/DOCXSearchTool.md | 29 +++++++++++++++++++++ docs/tools/DirectoryReadTool.md | 33 +++++++++++++++++++++++ docs/tools/DirectorySearchTool.md | 27 +++++++++++++++++++ docs/tools/FileReadTool.md | 29 +++++++++++++++++++++ docs/tools/GitHubSearchTool.md | 36 ++++++++++++++++++++++++++ docs/tools/JSONSearchTool.md | 27 +++++++++++++++++++ docs/tools/MDXSearchTool.md | 29 +++++++++++++++++++++ docs/tools/PDFSearchTool.md | 29 +++++++++++++++++++++ docs/tools/PGSearchTool.md | 28 ++++++++++++++++++++ docs/tools/ScrapeWebsiteTool.md | 24 +++++++++++++++++ docs/tools/SeleniumScrapingTool.md | 33 +++++++++++++++++++++++ docs/tools/SerperDevTool.md | 30 +++++++++++++++++++++ docs/tools/TXTSearchTool.md | 31 ++++++++++++++++++++++ docs/tools/WebsiteSearchTool.md | 29 +++++++++++++++++++++ docs/tools/XMLSearchTool.md | 29 +++++++++++++++++++++ docs/tools/YoutubeChannelSearchTool.md | 29 +++++++++++++++++++++ docs/tools/YoutubeVideoSearchTool.md | 32 +++++++++++++++++++++++ mkdocs.yml | 21 +++++++++++++++ 20 files changed, 556 insertions(+) create mode 100644 docs/tools/CSVSearchTool.md create mode 100644 docs/tools/CodeDocsSearchTool.md create mode 100644 docs/tools/DOCXSearchTool.md create mode 100644 docs/tools/DirectoryReadTool.md create mode 100644 docs/tools/DirectorySearchTool.md create mode 100644 docs/tools/FileReadTool.md create mode 100644 docs/tools/GitHubSearchTool.md create mode 100644 docs/tools/JSONSearchTool.md create mode 100644 docs/tools/MDXSearchTool.md create mode 100644 docs/tools/PDFSearchTool.md create mode 100644 docs/tools/PGSearchTool.md create mode 100644 docs/tools/ScrapeWebsiteTool.md create mode 100644 docs/tools/SeleniumScrapingTool.md create mode 100644 docs/tools/SerperDevTool.md create mode 100644 docs/tools/TXTSearchTool.md create mode 100644 docs/tools/WebsiteSearchTool.md create mode 100644 docs/tools/XMLSearchTool.md create mode 100644 docs/tools/YoutubeChannelSearchTool.md create mode 100644 docs/tools/YoutubeVideoSearchTool.md diff --git a/docs/tools/CSVSearchTool.md b/docs/tools/CSVSearchTool.md new file mode 100644 index 0000000000..66dd46cc0f --- /dev/null +++ b/docs/tools/CSVSearchTool.md @@ -0,0 +1,31 @@ +# CSVSearchTool + +## Description + +This tool is used to perform a RAG (Retrieval-Augmented Generation) search within a CSV file's content. It allows users to semantically search for queries in the content of a specified CSV file. This feature is particularly useful for extracting information from large CSV datasets where traditional search methods might be inefficient. All tools with "Search" in their name, including CSVSearchTool, are RAG tools designed for searching different sources of data. + +## Installation + +Install the crewai_tools package + +```shell +pip install 'crewai[tools]' +``` + +## Example + +```python +from crewai_tools import CSVSearchTool + +# Initialize the tool with a specific CSV file. This setup allows the agent to only search the given CSV file. +tool = CSVSearchTool(csv='path/to/your/csvfile.csv') + +# OR + +# Initialize the tool without a specific CSV file. Agent will need to provide the CSV path at runtime. +tool = CSVSearchTool() +``` + +## Arguments + +- `csv` : The path to the CSV file you want to search. This is a mandatory argument if the tool was initialized without a specific CSV file; otherwise, it is optional. \ No newline at end of file diff --git a/docs/tools/CodeDocsSearchTool.md b/docs/tools/CodeDocsSearchTool.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/tools/DOCXSearchTool.md b/docs/tools/DOCXSearchTool.md new file mode 100644 index 0000000000..033c722263 --- /dev/null +++ b/docs/tools/DOCXSearchTool.md @@ -0,0 +1,29 @@ +# DOCXSearchTool + +## Description +The DOCXSearchTool is a RAG tool designed for semantic searching within DOCX documents. It enables users to effectively search and extract relevant information from DOCX files using query-based searches. This tool is invaluable for data analysis, information management, and research tasks, streamlining the process of finding specific information within large document collections. + +## Installation +Install the crewai_tools package by running the following command in your terminal: + +```shell +pip install 'crewai[tools]' +``` + +## Example +The following example demonstrates initializing the DOCXSearchTool to search within any DOCX file's content or with a specific DOCX file path. + +```python +from crewai_tools import DOCXSearchTool + +# Initialize the tool to search within any DOCX file's content +tool = DOCXSearchTool() + +# OR + +# Initialize the tool with a specific DOCX file, so the agent can only search the content of the specified DOCX file +tool = DOCXSearchTool(docx='path/to/your/document.docx') +``` + +## Arguments +- `docx`: An optional file path to a specific DOCX document you wish to search. If not provided during initialization, the tool allows for later specification of any DOCX file's content path for searching. diff --git a/docs/tools/DirectoryReadTool.md b/docs/tools/DirectoryReadTool.md new file mode 100644 index 0000000000..9ba884eb4d --- /dev/null +++ b/docs/tools/DirectoryReadTool.md @@ -0,0 +1,33 @@ +# DirectoryReadTool + +## Description +The DirectoryReadTool is a highly efficient utility designed for the comprehensive listing of directory contents. It recursively navigates through the specified directory, providing users with a detailed enumeration of all files, including those nested within subdirectories. This tool is indispensable for tasks requiring a thorough inventory of directory structures or for validating the organization of files within directories. + +## Installation +Install the `crewai_tools` package to use the DirectoryReadTool in your project. If you haven't added this package to your environment, you can easily install it with pip using the following command: + +```shell +pip install 'crewai[tools]' +``` + +This installs the latest version of the `crewai_tools` package, allowing access to the DirectoryReadTool and other utilities. + +## Example +The DirectoryReadTool is simple to use. The code snippet below shows how to set up and use the tool to list the contents of a specified directory: + +```python +from crewai_tools import DirectoryReadTool + +# Initialize the tool so the agent can read any directory's content it learns about during execution +tool = DirectoryReadTool() + +# OR + +# Initialize the tool with a specific directory, so the agent can only read the content of the specified directory +tool = DirectoryReadTool(directory='/path/to/your/directory') +``` + +## Arguments +The DirectoryReadTool requires minimal configuration for use. The essential argument for this tool is as follows: + +- `directory`: **Optional** A argument that specifies the path to the directory whose contents you wish to list. It accepts both absolute and relative paths, guiding the tool to the desired directory for content listing. diff --git a/docs/tools/DirectorySearchTool.md b/docs/tools/DirectorySearchTool.md new file mode 100644 index 0000000000..acc9718076 --- /dev/null +++ b/docs/tools/DirectorySearchTool.md @@ -0,0 +1,27 @@ +# DirectorySearchTool + +## Description +This tool is designed to perform a semantic search for queries within the content of a specified directory. Utilizing the RAG (Retrieval-Augmented Generation) methodology, it offers a powerful means to semantically navigate through the files of a given directory. The tool can be dynamically set to search any directory specified at runtime or can be pre-configured to search within a specific directory upon initialization. + +## Installation +To start using the DirectorySearchTool, you need to install the crewai_tools package. Execute the following command in your terminal: + +```shell +pip install 'crewai[tools]' +``` + +## Example +The following examples demonstrate how to initialize the DirectorySearchTool for different use cases and how to perform a search: + +```python +from crewai_tools import DirectorySearchTool + +# To enable searching within any specified directory at runtime +tool = DirectorySearchTool() + +# Alternatively, to restrict searches to a specific directory +tool = DirectorySearchTool(directory='/path/to/directory') +``` + +## Arguments +- `directory` : This string argument specifies the directory within which to search. It is mandatory if the tool has not been initialized with a directory; otherwise, the tool will only search within the initialized directory. \ No newline at end of file diff --git a/docs/tools/FileReadTool.md b/docs/tools/FileReadTool.md new file mode 100644 index 0000000000..12fde156c2 --- /dev/null +++ b/docs/tools/FileReadTool.md @@ -0,0 +1,29 @@ +# FileReadTool + +## Description +The FileReadTool is a versatile component of the crewai_tools package, designed to streamline the process of reading and retrieving content from files. It is particularly useful in scenarios such as batch text file processing, runtime configuration file reading, and data importation for analytics. This tool supports various text-based file formats including `.txt`, `.csv`, `.json` and more, and adapts its functionality based on the file type, for instance, converting JSON content into a Python dictionary for easy use. + +## Installation +Install the crewai_tools package to use the FileReadTool in your projects: + +```shell +pip install 'crewai[tools]' +``` + +## Example +To get started with the FileReadTool: + +```python +from crewai_tools import FileReadTool + +# Initialize the tool to read any files the agents knows or lean the path for +file_read_tool = FileReadTool() + +# OR + +# Initialize the tool with a specific file path, so the agent can only read the content of the specified file +file_read_tool = FileReadTool(file_path='path/to/your/file.txt') +``` + +## Arguments +- `file_path`: The path to the file you want to read. It accepts both absolute and relative paths. Ensure the file exists and you have the necessary permissions to access it. \ No newline at end of file diff --git a/docs/tools/GitHubSearchTool.md b/docs/tools/GitHubSearchTool.md new file mode 100644 index 0000000000..0ed6faeef7 --- /dev/null +++ b/docs/tools/GitHubSearchTool.md @@ -0,0 +1,36 @@ +# GitHubSearchTool + +## Description +The GitHubSearchTool is a Read, Append, and Generate (RAG) tool specifically designed for conducting semantic searches within GitHub repositories. Utilizing advanced semantic search capabilities, it sifts through code, pull requests, issues, and repositories, making it an essential tool for developers, researchers, or anyone in need of precise information from GitHub. + +## Installation +To use the GitHubSearchTool, first ensure the crewai_tools package is installed in your Python environment: + +```shell +pip install 'crewai[tools]' +``` + +This command installs the necessary package to run the GitHubSearchTool along with any other tools included in the crewai_tools package. + +## Example +Here’s how you can use the GitHubSearchTool to perform semantic searches within a GitHub repository: +```python +from crewai_tools import GitHubSearchTool + +# Initialize the tool for semantic searches within a specific GitHub repository +tool = GitHubSearchTool( + github_repo='https://github.com/example/repo', + content_types=['code', 'issue'] # Options: code, repo, pr, issue +) + +# OR + +# Initialize the tool for semantic searches within a specific GitHub repository, so the agent can search any repository if it learns about during its execution +tool = GitHubSearchTool( + content_types=['code', 'issue'] # Options: code, repo, pr, issue +) +``` + +## Arguments +- `github_repo` : The URL of the GitHub repository where the search will be conducted. This is a mandatory field and specifies the target repository for your search. +- `content_types` : Specifies the types of content to include in your search. You must provide a list of content types from the following options: `code` for searching within the code, `repo` for searching within the repository's general information, `pr` for searching within pull requests, and `issue` for searching within issues. This field is mandatory and allows tailoring the search to specific content types within the GitHub repository. diff --git a/docs/tools/JSONSearchTool.md b/docs/tools/JSONSearchTool.md new file mode 100644 index 0000000000..df43cc4a69 --- /dev/null +++ b/docs/tools/JSONSearchTool.md @@ -0,0 +1,27 @@ +# JSONSearchTool + +## Description +This tool is used to perform a RAG search within a JSON file's content. It allows users to initiate a search with a specific JSON path, focusing the search operation within that particular JSON file. If the path is provided at initialization, the tool restricts its search scope to the specified JSON file, thereby enhancing the precision of search results. + +## Installation +Install the crewai_tools package by executing the following command in your terminal: + +```shell +pip install 'crewai[tools]' +``` + +## Example +Below are examples demonstrating how to use the JSONSearchTool for searching within JSON files. You can either search any JSON content or restrict the search to a specific JSON file. + +```python +from crewai_tools import JSONSearchTool + +# Example 1: Initialize the tool for a general search across any JSON content. This is useful when the path is known or can be discovered during execution. +tool = JSONSearchTool() + +# Example 2: Initialize the tool with a specific JSON path, limiting the search to a particular JSON file. +tool = JSONSearchTool(json_path='./path/to/your/file.json') +``` + +## Arguments +- `json_path` (str): An optional argument that defines the path to the JSON file to be searched. This parameter is only necessary if the tool is initialized without a specific JSON path. Providing this argument restricts the search to the specified JSON file. \ No newline at end of file diff --git a/docs/tools/MDXSearchTool.md b/docs/tools/MDXSearchTool.md new file mode 100644 index 0000000000..751988c9ba --- /dev/null +++ b/docs/tools/MDXSearchTool.md @@ -0,0 +1,29 @@ +# MDXSearchTool + +## Description +The MDX Search Tool, a key component of the `crewai_tools` package, is designed for advanced market data extraction, offering invaluable support to researchers and analysts requiring immediate market insights in the AI sector. With its ability to interface with various data sources and tools, it streamlines the process of acquiring, reading, and organizing market data efficiently. + +## Installation +To utilize the MDX Search Tool, ensure the `crewai_tools` package is installed. If not already present, install it using the following command: + +```shell +pip install 'crewai[tools]' +``` + +## Example +Configuring and using the MDX Search Tool involves setting up environment variables and utilizing the tool within a crewAI project for market research. Here's a simple example: + +```python +from crewai_tools import MDXSearchTool + +# Initialize the tool so the agent can search any MDX content if it learns about during its execution +tool = MDXSearchTool() + +# OR + +# Initialize the tool with a specific MDX file path for exclusive search within that document +tool = MDXSearchTool(mdx='path/to/your/document.mdx') +``` + +## Arguments +- mdx: **Optional** The MDX path for the search. Can be provided at initialization \ No newline at end of file diff --git a/docs/tools/PDFSearchTool.md b/docs/tools/PDFSearchTool.md new file mode 100644 index 0000000000..c927d1bcbd --- /dev/null +++ b/docs/tools/PDFSearchTool.md @@ -0,0 +1,29 @@ +# PDFSearchTool + +## Description +The PDFSearchTool is a RAG tool designed for semantic searches within PDF content. It allows for inputting a search query and a PDF document, leveraging advanced search techniques to find relevant content efficiently. This capability makes it especially useful for extracting specific information from large PDF files quickly. + +## Installation +To get started with the PDFSearchTool, first, ensure the crewai_tools package is installed with the following command: + +```shell +pip install 'crewai[tools]' +``` + +## Example +Here's how to use the PDFSearchTool to search within a PDF document: + +```python +from crewai_tools import PDFSearchTool + +# Initialize the tool allowing for any PDF content search if the path is provided during execution +tool = PDFSearchTool() + +# OR + +# Initialize the tool with a specific PDF path for exclusive search within that document +tool = PDFSearchTool(pdf='path/to/your/document.pdf') +``` + +## Arguments +- `pdf`: **Optinal** The PDF path for the search. Can be provided at initialization or within the `run` method's arguments. If provided at initialization, the tool confines its search to the specified document. diff --git a/docs/tools/PGSearchTool.md b/docs/tools/PGSearchTool.md new file mode 100644 index 0000000000..a8bae491fc --- /dev/null +++ b/docs/tools/PGSearchTool.md @@ -0,0 +1,28 @@ +# PGSearchTool + +## Description +This tool is designed to facilitate semantic searches within PostgreSQL database tables. Leveraging the RAG (Retrieve and Generate) technology, the PGSearchTool provides users with an efficient means of querying database table content, specifically tailored for PostgreSQL databases. It simplifies the process of finding relevant data through semantic search queries, making it an invaluable resource for users needing to perform advanced queries on extensive datasets within a PostgreSQL database. + +## Installation +To install the `crewai_tools` package and utilize the PGSearchTool, execute the following command in your terminal: + +```shell +pip install 'crewai[tools]' +``` + +## Example +Below is an example showcasing how to use the PGSearchTool to conduct a semantic search on a table within a PostgreSQL database: + +```python +from crewai_tools import PGSearchTool + +# Initialize the tool with the database URI and the target table name +tool = PGSearchTool(db_uri='postgresql://user:password@localhost:5432/mydatabase', table_name='employees') + +``` + +## Arguments +The PGSearchTool requires the following arguments for its operation: + +- `db_uri`: A string representing the URI of the PostgreSQL database to be queried. This argument is mandatory and must include the necessary authentication details and the location of the database. +- `table_name`: A string specifying the name of the table within the database on which the semantic search will be performed. This argument is mandatory. \ No newline at end of file diff --git a/docs/tools/ScrapeWebsiteTool.md b/docs/tools/ScrapeWebsiteTool.md new file mode 100644 index 0000000000..6a933c355a --- /dev/null +++ b/docs/tools/ScrapeWebsiteTool.md @@ -0,0 +1,24 @@ +# ScrapeWebsiteTool + +## Description +A tool designed to extract and read the content of a specified website. It is capable of handling various types of web pages by making HTTP requests and parsing the received HTML content. This tool can be particularly useful for web scraping tasks, data collection, or extracting specific information from websites. + +## Installation +Install the crewai_tools package +```shell +pip install 'crewai[tools]' +``` + +## Example +```python +from crewai_tools import ScrapeWebsiteTool + +# To enable scrapping any website it finds during it's execution +tool = ScrapeWebsiteTool() + +# Initialize the tool with the website URL, so the agent can only scrap the content of the specified website +tool = ScrapeWebsiteTool(website_url='https://www.example.com') +``` + +## Arguments +- `website_url` : Mandatory website URL to read the file. This is the primary input for the tool, specifying which website's content should be scraped and read. \ No newline at end of file diff --git a/docs/tools/SeleniumScrapingTool.md b/docs/tools/SeleniumScrapingTool.md new file mode 100644 index 0000000000..631fcfe0e9 --- /dev/null +++ b/docs/tools/SeleniumScrapingTool.md @@ -0,0 +1,33 @@ +# SeleniumScrapingTool + +## Description +This tool is designed for efficient web scraping, enabling users to extract content from web pages. It supports targeted scraping by allowing the specification of a CSS selector for desired elements. The flexibility of the tool enables it to be used on any website URL provided by the user, making it a versatile tool for various web scraping needs. + +## Installation +Install the crewai_tools package +``` +pip install 'crewai[tools]' +``` + +## Example +```python +from crewai_tools import SeleniumScrapingTool + +# Example 1: Scrape any website it finds during its execution +tool = SeleniumScrapingTool() + +# Example 2: Scrape the entire webpage +tool = SeleniumScrapingTool(website_url='https://example.com') + +# Example 3: Scrape a specific CSS element from the webpage +tool = SeleniumScrapingTool(website_url='https://example.com', css_element='.main-content') + +# Example 4: Scrape using optional parameters for customized scraping +tool = SeleniumScrapingTool(website_url='https://example.com', css_element='.main-content', cookie={'name': 'user', 'value': 'John Doe'}) +``` + +## Arguments +- `website_url`: Mandatory. The URL of the website to scrape. +- `css_element`: Mandatory. The CSS selector for a specific element to scrape from the website. +- `cookie`: Optional. A dictionary containing cookie information. This parameter allows the tool to simulate a session with cookie information, providing access to content that may be restricted to logged-in users. +- `wait_time`: Optional. The number of seconds the tool waits after loading the website and after setting a cookie, before scraping the content. This allows for dynamic content to load properly. diff --git a/docs/tools/SerperDevTool.md b/docs/tools/SerperDevTool.md new file mode 100644 index 0000000000..ae900a3bc6 --- /dev/null +++ b/docs/tools/SerperDevTool.md @@ -0,0 +1,30 @@ +# SerperDevTool Documentation + +## Description +This tool is designed to perform a semantic search for a specified query from a text's content across the internet. It utilizes the `serper.dev` API to fetch and display the most relevant search results based on the query provided by the user. + +## Installation +To incorporate this tool into your project, follow the installation instructions below: +```shell +pip install 'crewai[tools]' +``` + +## Example +The following example demonstrates how to initialize the tool and execute a search with a given query: + +```python +from crewai_tools import SerperDevTool + +# Initialize the tool for internet searching capabilities +tool = SerperDevTool() +``` + +## Steps to Get Started +To effectively use the `SerperDevTool`, follow these steps: + +1. **Package Installation**: Confirm that the `crewai[tools]` package is installed in your Python environment. +2. **API Key Acquisition**: Acquire a `serper.dev` API key by registering for a free account at `serper.dev`. +3. **Environment Configuration**: Store your obtained API key in an environment variable named `SERPER_API_KEY` to facilitate its use by the tool. + +## Conclusion +By integrating the `SerperDevTool` into Python projects, users gain the ability to conduct real-time, relevant searches across the internet directly from their applications. By adhering to the setup and usage guidelines provided, incorporating this tool into projects is streamlined and straightforward. diff --git a/docs/tools/TXTSearchTool.md b/docs/tools/TXTSearchTool.md new file mode 100644 index 0000000000..720a47d356 --- /dev/null +++ b/docs/tools/TXTSearchTool.md @@ -0,0 +1,31 @@ +# TXTSearchTool + +## Description +This tool is used to perform a RAG (Retrieval-Augmented Generation) search within the content of a text file. It allows for semantic searching of a query within a specified text file's content, making it an invaluable resource for quickly extracting information or finding specific sections of text based on the query provided. + +## Installation +To use the TXTSearchTool, you first need to install the crewai_tools package. This can be done using pip, a package manager for Python. Open your terminal or command prompt and enter the following command: + +```shell +pip install 'crewai[tools]' +``` + +This command will download and install the TXTSearchTool along with any necessary dependencies. + +## Example +The following example demonstrates how to use the TXTSearchTool to search within a text file. This example shows both the initialization of the tool with a specific text file and the subsequent search within that file's content. + +```python +from crewai_tools import TXTSearchTool + +# Initialize the tool to search within any text file's content the agent learns about during its execution +tool = TXTSearchTool() + +# OR + +# Initialize the tool with a specific text file, so the agent can search within the given text file's content +tool = TXTSearchTool(txt='path/to/text/file.txt') +``` + +## Arguments +- `txt` (str): **Optinal**. The path to the text file you want to search. This argument is only required if the tool was not initialized with a specific text file; otherwise, the search will be conducted within the initially provided text file. diff --git a/docs/tools/WebsiteSearchTool.md b/docs/tools/WebsiteSearchTool.md new file mode 100644 index 0000000000..306caae856 --- /dev/null +++ b/docs/tools/WebsiteSearchTool.md @@ -0,0 +1,29 @@ +# WebsiteSearchTool + +## Description +This tool is specifically crafted for conducting semantic searches within the content of a particular website. Leveraging a Retrieval-Augmented Generation (RAG) model, it navigates through the information provided on a given URL. Users have the flexibility to either initiate a search across any website known or discovered during its usage or to concentrate the search on a predefined, specific website. + +## Installation +Install the crewai_tools package by executing the following command in your terminal: + +```shell +pip install 'crewai[tools]' +``` + +## Example +To utilize the WebsiteSearchTool for different use cases, follow these examples: + +```python +from crewai_tools import WebsiteSearchTool + +# To enable the tool to search any website the agent comes across or learns about during its operation +tool = WebsiteSearchTool() + +# OR + +# To restrict the tool to only search within the content of a specific website. +tool = WebsiteSearchTool(website='https://example.com') +``` + +## Arguments +- `website` : An optional argument that specifies the valid website URL to perform the search on. This becomes necessary if the tool is initialized without a specific website. In the `WebsiteSearchToolSchema`, this argument is mandatory. However, in the `FixedWebsiteSearchToolSchema`, it becomes optional if a website is provided during the tool's initialization, as it will then only search within the predefined website's content. \ No newline at end of file diff --git a/docs/tools/XMLSearchTool.md b/docs/tools/XMLSearchTool.md new file mode 100644 index 0000000000..416cb2c67a --- /dev/null +++ b/docs/tools/XMLSearchTool.md @@ -0,0 +1,29 @@ +# XMLSearchTool + +## Description +The XMLSearchTool is a cutting-edge RAG tool engineered for conducting semantic searches within XML files. Ideal for users needing to parse and extract information from XML content efficiently, this tool supports inputting a search query and an optional XML file path. By specifying an XML path, users can target their search more precisely to the content of that file, thereby obtaining more relevant search outcomes. + +## Installation +To start using the XMLSearchTool, you must first install the crewai_tools package. This can be easily done with the following command: + +```shell +pip install 'crewai[tools]' +``` + +## Example +Here are two examples demonstrating how to use the XMLSearchTool. The first example shows searching within a specific XML file, while the second example illustrates initiating a search without predefining an XML path, providing flexibility in search scope. + +```python +from crewai_tools.tools.xml_search_tool import XMLSearchTool + +# Allow agents to search within any XML file's content as it learns about their paths during execution +tool = XMLSearchTool() + +# OR + +# Initialize the tool with a specific XML file path for exclusive search within that document +tool = XMLSearchTool(xml='path/to/your/xmlfile.xml') +``` + +## Arguments +- `xml`: This is the path to the XML file you wish to search. It is an optional parameter during the tool's initialization but must be provided either at initialization or as part of the `run` method's arguments to execute a search. diff --git a/docs/tools/YoutubeChannelSearchTool.md b/docs/tools/YoutubeChannelSearchTool.md new file mode 100644 index 0000000000..95f34721ea --- /dev/null +++ b/docs/tools/YoutubeChannelSearchTool.md @@ -0,0 +1,29 @@ +# YoutubeChannelSearchTool + +## Description +This tool is designed to perform semantic searches within a specific Youtube channel's content. Leveraging the RAG (Retrieval-Augmented Generation) methodology, it provides relevant search results, making it invaluable for extracting information or finding specific content without the need to manually sift through videos. It streamlines the search process within Youtube channels, catering to researchers, content creators, and viewers seeking specific information or topics. + +## Installation +To utilize the YoutubeChannelSearchTool, the `crewai_tools` package must be installed. Execute the following command in your shell to install: + +```shell +pip install 'crewai[tools]' +``` + +## Example +To begin using the YoutubeChannelSearchTool, follow the example below. This demonstrates initializing the tool with a specific Youtube channel handle and conducting a search within that channel's content. + +```python +from crewai_tools import YoutubeChannelSearchTool + +# Initialize the tool to search within any Youtube channel's content the agent learns about during its execution +tool = YoutubeChannelSearchTool() + +# OR + +# Initialize the tool with a specific Youtube channel handle to target your search +tool = YoutubeChannelSearchTool(youtube_channel_handle='@exampleChannel') +``` + +## Arguments +- `youtube_channel_handle` : A mandatory string representing the Youtube channel handle. This parameter is crucial for initializing the tool to specify the channel you want to search within. The tool is designed to only search within the content of the provided channel handle. diff --git a/docs/tools/YoutubeVideoSearchTool.md b/docs/tools/YoutubeVideoSearchTool.md new file mode 100644 index 0000000000..55faa00023 --- /dev/null +++ b/docs/tools/YoutubeVideoSearchTool.md @@ -0,0 +1,32 @@ +# YoutubeVideoSearchTool + +## 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: + +``` +pip install 'crewai[tools]' +``` + +## 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. + +```python +from crewai_tools import YoutubeVideoSearchTool + +# General search across Youtube content without specifying a video URL, so the agent can search within any Youtube video content it learns about irs url during its operation +tool = YoutubeVideoSearchTool() + +# Targeted search within a specific Youtube video's content +tool = YoutubeVideoSearchTool(youtube_video_url='https://youtube.com/watch?v=example') +``` +## 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. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 4be09b32a2..9655df1c93 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -133,6 +133,27 @@ nav: - Connecting to any LLM: 'how-to/LLM-Connections.md' - Customizing Agents: 'how-to/Customizing-Agents.md' - Human Input on Execution: 'how-to/Human-Input-on-Execution.md' + - Tools Docs: + - Google Serper Search: 'tools-docs/SerperDevTool.md' + - Scrape Website: 'tools-docs/ScrapeWebsiteTool.md' + - Directory Read: 'tools-docs/DirectoryReadTool.md' + - File Read: 'tools-docs/FileReadTool.md' + - Selenium Scraper: 'tools-docs/SeleniumScrapingTool.md' + - Directory RAG Search: 'tools-docs/DirectorySearchTool.md' + - PDF RAG Search: 'tools-docs/PDFSearchTool.md' + - TXT RAG Search: 'tools-docs/TXTSearchTool.md' + - CSV RAG Search: 'tools-docs/CSVSearchTool.md' + - XML RAG Search: 'tools-docs/XMLSearchTool.md' + - JSON RAG Search: 'tools-docs/JSONSearchTool.md' + - Docx Rag Search: 'tools-docs/DOCXSearchTool.md' + - MDX RAG Search: 'tools-docs/MDXSearchTool.md' + - PG RAG Search: 'tools-docs/PGSearchTool.md' + - Website RAG Search: 'tools-docs/WebsiteSearchTool.md' + - Github RAG Search: 'tools-docs/GitHubSearchTool.md' + - Code Docs RAG Search: 'tools-docs/CodeDocsSearchTool.md' + - Youtube Video RAG Search: 'tools-docs/YoutubeVideoSearchTool.md' + - Youtube Chanel RAG Search: 'tools-docs/YoutubeChannelSearchTool.md' + - Examples: - Trip Planner Crew: https://github.com/joaomdmoura/crewAI-examples/tree/main/trip_planner" - Create Instagram Post: https://github.com/joaomdmoura/crewAI-examples/tree/main/instagram_post"