From 768bb74a2c17e46863556e1dae47091e2a77155f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Thu, 2 May 2024 02:50:54 -0300 Subject: [PATCH] renaming exa tool --- src/crewai_tools/__init__.py | 1 + src/crewai_tools/tools/__init__.py | 1 + src/crewai_tools/tools/exa_tools/README.md | 30 +++++++++++++++++++ ..._url_search_tool.py => exa_search_tool.py} | 2 +- 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/crewai_tools/tools/exa_tools/README.md rename src/crewai_tools/tools/exa_tools/{exa_url_search_tool.py => exa_search_tool.py} (93%) diff --git a/src/crewai_tools/__init__.py b/src/crewai_tools/__init__.py index 34e15b876..faac5d37d 100644 --- a/src/crewai_tools/__init__.py +++ b/src/crewai_tools/__init__.py @@ -6,6 +6,7 @@ from .tools import ( DirectorySearchTool, DOCXSearchTool, DirectoryReadTool, + EXASearchTool, FileReadTool, GithubSearchTool, SerperDevTool, diff --git a/src/crewai_tools/tools/__init__.py b/src/crewai_tools/tools/__init__.py index efbe0588e..648671d97 100644 --- a/src/crewai_tools/tools/__init__.py +++ b/src/crewai_tools/tools/__init__.py @@ -4,6 +4,7 @@ from .csv_search_tool.csv_search_tool import CSVSearchTool from .directory_search_tool.directory_search_tool import DirectorySearchTool from .directory_read_tool.directory_read_tool import DirectoryReadTool from .docx_search_tool.docx_search_tool import DOCXSearchTool +from .exa_tools.exa_search_tool import EXASearchTool from .file_read_tool.file_read_tool import FileReadTool from .github_search_tool.github_search_tool import GithubSearchTool from .serper_dev_tool.serper_dev_tool import SerperDevTool diff --git a/src/crewai_tools/tools/exa_tools/README.md b/src/crewai_tools/tools/exa_tools/README.md new file mode 100644 index 000000000..8d556dab3 --- /dev/null +++ b/src/crewai_tools/tools/exa_tools/README.md @@ -0,0 +1,30 @@ +# EXASearchTool 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 `https://exa.ai/` 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 EXASearchTool + +# Initialize the tool for internet searching capabilities +tool = EXASearchTool() +``` + +## Steps to Get Started +To effectively use the `EXASearchTool`, follow these steps: + +1. **Package Installation**: Confirm that the `crewai[tools]` package is installed in your Python environment. +2. **API Key Acquisition**: Acquire a `https://exa.ai/` API key by registering for a free account at `https://exa.ai/`. +3. **Environment Configuration**: Store your obtained API key in an environment variable named `EXA_API_KEY` to facilitate its use by the tool. + +## Conclusion +By integrating the `EXASearchTool` 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/src/crewai_tools/tools/exa_tools/exa_url_search_tool.py b/src/crewai_tools/tools/exa_tools/exa_search_tool.py similarity index 93% rename from src/crewai_tools/tools/exa_tools/exa_url_search_tool.py rename to src/crewai_tools/tools/exa_tools/exa_search_tool.py index 6e5f389b7..fe67c4fa2 100644 --- a/src/crewai_tools/tools/exa_tools/exa_url_search_tool.py +++ b/src/crewai_tools/tools/exa_tools/exa_search_tool.py @@ -3,7 +3,7 @@ from typing import Any from .exa_base_tool import EXABaseTool -class EXAURLTool(EXABaseTool): +class EXASearchTool(EXABaseTool): def _run( self, **kwargs: Any,