Skip to content

Commit

Permalink
docs: Update Dalle, FileWrite, Nl2Sql and Side menu Tools (#1175)
Browse files Browse the repository at this point in the history
* docs: Update Dalle, FileWrite, Nl2Sql and Side menu Tools

* docs: remove unused phrase

* docs: fix identation
  • Loading branch information
pythonbyte authored Aug 13, 2024
1 parent 9f85a2a commit 97d7bfb
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 29 deletions.
10 changes: 5 additions & 5 deletions docs/tools/DALL-ETool.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ If needed you can also tweak the parameters of the DALL-E model by passing them
```python
from crewai_tools import DallETool

dalle_tool = DallETool(model: str = "dall-e-3",
size: str = "1024x1024",
quality: str = "standard",
n: int = 1)
dalle_tool = DallETool(model="dall-e-3",
size="1024x1024",
quality="standard",
n=1)

Agent(
...
tools=[dalle_tool]
)
```

The parameter are based on the `client.images.generate` method from the OpenAI API. For more information on the parameters, please refer to the [OpenAI API documentation](https://platform.openai.com/docs/guides/images/introduction?lang=python).
The parameters are based on the `client.images.generate` method from the OpenAI API. For more information on the parameters, please refer to the [OpenAI API documentation](https://platform.openai.com/docs/guides/images/introduction?lang=python).
33 changes: 33 additions & 0 deletions docs/tools/FileWriteTool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# FileWriterTool Documentation

## Description
The `FileWriterTool` is a component of the crewai_tools package, designed to simplify the process of writing content to files. It is particularly useful in scenarios such as generating reports, saving logs, creating configuration files, and more. This tool supports creating new directories if they don't exist, making it easier to organize your output.

## Installation
Install the crewai_tools package to use the `FileWriterTool` in your projects:

```shell
pip install 'crewai[tools]'
```

## Example
To get started with the `FileWriterTool`:

```python
from crewai_tools import FileWriterTool

# Initialize the tool
file_writer_tool = FileWriterTool()

# Write content to a file in a specified directory
result = file_writer_tool._run('example.txt', 'This is a test content.', 'test_directory')
print(result)
```

## Arguments
- `filename`: The name of the file you want to create or overwrite.
- `content`: The content to write into the file.
- `directory` (optional): The path to the directory where the file will be created. Defaults to the current directory (`.`). If the directory does not exist, it will be created.

## Conclusion
By integrating the `FileWriterTool` into your crews, the agents can execute the process of writing content to files and creating directories. This tool is essential for tasks that require saving output data, creating structured file systems, and more. By adhering to the setup and usage guidelines provided, incorporating this tool into projects is straightforward and efficient.
12 changes: 6 additions & 6 deletions docs/tools/NL2SQLTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ The primary task goal was:

So the Agent tried to get information from the DB, the first one is wrong so the Agent tries again and gets the correct information and passes to the next agent.

![alt text](images/image-2.png)
![alt text](images/image-3.png)
![alt text](https://github.com/crewAIInc/crewAI-tools/blob/main/crewai_tools/tools/nl2sql/images/image-2.png?raw=true)
![alt text](https://github.com/crewAIInc/crewAI-tools/raw/main/crewai_tools/tools/nl2sql/images/image-3.png)


The second task goal was:
Expand All @@ -58,11 +58,11 @@ Include information on the average, maximum, and minimum monthly revenue for eac

Now things start to get interesting, the Agent generates the SQL query to not only create the table but also insert the data into the table. And in the end the Agent still returns the final report which is exactly what was in the database.

![alt text](images/image-4.png)
![alt text](images/image-5.png)
![alt text](https://github.com/crewAIInc/crewAI-tools/raw/main/crewai_tools/tools/nl2sql/images/image-4.png)
![alt text](https://github.com/crewAIInc/crewAI-tools/raw/main/crewai_tools/tools/nl2sql/images/image-5.png)

![alt text](images/image-9.png)
![alt text](images/image-7.png)
![alt text](https://github.com/crewAIInc/crewAI-tools/raw/main/crewai_tools/tools/nl2sql/images/image-9.png)
![alt text](https://github.com/crewAIInc/crewAI-tools/raw/main/crewai_tools/tools/nl2sql/images/image-7.png)


This is a simple example of how the NL2SQLTool can be used to interact with the database and generate reports based on the data in the database.
Expand Down
37 changes: 19 additions & 18 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,36 +152,37 @@ nav:
- Agent Monitoring with AgentOps: 'how-to/AgentOps-Observability.md'
- Agent Monitoring with LangTrace: 'how-to/Langtrace-Observability.md'
- Tools Docs:
- Firecrawl Scrape Website Tool: 'tools/FirecrawlScrapeWebsiteTool.md'
- Firecrawl Crawl Website Tool: 'tools/FirecrawlCrawlWebsiteTool.md'
- Firecrawl Search Tool: 'tools/FirecrawlSearchTool.md'
- Google Serper Search: 'tools/SerperDevTool.md'
- Browserbase Web Loader: 'tools/BrowserbaseLoadTool.md'
- Composio Tools: 'tools/ComposioTool.md'
- Code Docs RAG Search: 'tools/CodeDocsSearchTool.md'
- Code Interpreter: 'tools/CodeInterpreterTool.md'
- Scrape Website: 'tools/ScrapeWebsiteTool.md'
- Composio Tools: 'tools/ComposioTool.md'
- CSV RAG Search: 'tools/CSVSearchTool.md'
- DALL-E Tool: 'tools/DALL-ETool.md'
- Directory RAG Search: 'tools/DirectorySearchTool.md'
- Directory Read: 'tools/DirectoryReadTool.md'
- Exa Serch Web Loader: 'tools/EXASearchTool.md'
- Docx Rag Search: 'tools/DOCXSearchTool.md'
- EXA Serch Web Loader: 'tools/EXASearchTool.md'
- File Read: 'tools/FileReadTool.md'
- Selenium Scraper: 'tools/SeleniumScrapingTool.md'
- Directory RAG Search: 'tools/DirectorySearchTool.md'
- DALL-E Tool: 'tools/DALL-ETool.md'
- PDF RAG Search: 'tools/PDFSearchTool.md'
- TXT RAG Search: 'tools/TXTSearchTool.md'
- CSV RAG Search: 'tools/CSVSearchTool.md'
- XML RAG Search: 'tools/XMLSearchTool.md'
- File Write: 'tools/FileWriteTool.md'
- Firecrawl Crawl Website Tool: 'tools/FirecrawlCrawlWebsiteTool.md'
- Firecrawl Scrape Website Tool: 'tools/FirecrawlScrapeWebsiteTool.md'
- Firecrawl Search Tool: 'tools/FirecrgstawlSearchTool.md'
- Github RAG Search: 'tools/GitHubSearchTool.md'
- Google Serper Search: 'tools/SerperDevTool.md'
- JSON RAG Search: 'tools/JSONSearchTool.md'
- Docx Rag Search: 'tools/DOCXSearchTool.md'
- MDX RAG Search: 'tools/MDXSearchTool.md'
- MySQL Tool: 'tools/MySQLTool.md'
- NL2SQL Tool: 'tools/NL2SQLTool.md'
- PDF RAG Search: 'tools/PDFSearchTool.md'
- PG RAG Search: 'tools/PGSearchTool.md'
- Scrape Website: 'tools/ScrapeWebsiteTool.md'
- Selenium Scraper: 'tools/SeleniumScrapingTool.md'
- TXT RAG Search: 'tools/TXTSearchTool.md'
- Vision Tool: 'tools/VisionTool.md'
- Website RAG Search: 'tools/WebsiteSearchTool.md'
- Github RAG Search: 'tools/GitHubSearchTool.md'
- Code Docs RAG Search: 'tools/CodeDocsSearchTool.md'
- Youtube Video RAG Search: 'tools/YoutubeVideoSearchTool.md'
- XML RAG Search: 'tools/XMLSearchTool.md'
- Youtube Channel RAG Search: 'tools/YoutubeChannelSearchTool.md'
- Youtube Video RAG Search: 'tools/YoutubeVideoSearchTool.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"
Expand Down

0 comments on commit 97d7bfb

Please sign in to comment.