GithubSearchTool
We are still working on improving tools, so there might be unexpected behavior or changes in the future.
Description
The GithubSearchTool is a Retrieval-Augmented Generation (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:Example
Here’s how you can use the GithubSearchTool to perform semantic searches within a GitHub repository:Code
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.gh_token
: Your GitHub Personal Access Token (PAT) required for authentication. You can create one in your GitHub account settings under Developer Settings > Personal Access Tokens.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, andissue
for searching within issues. This field is mandatory and allows tailoring the search to specific content types within the GitHub repository.
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:Code