mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
docs: Update Dalle, FileWrite, Nl2Sql and Side menu Tools
This commit is contained in:
@@ -27,10 +27,10 @@ If needed you can also tweak the parameters of the DALL-E model by passing them
|
|||||||
```python
|
```python
|
||||||
from crewai_tools import DallETool
|
from crewai_tools import DallETool
|
||||||
|
|
||||||
dalle_tool = DallETool(model: str = "dall-e-3",
|
dalle_tool = DallETool(model="dall-e-3",
|
||||||
size: str = "1024x1024",
|
size="1024x1024",
|
||||||
quality: str = "standard",
|
quality="standard",
|
||||||
n: int = 1)
|
n=1)
|
||||||
|
|
||||||
Agent(
|
Agent(
|
||||||
...
|
...
|
||||||
@@ -38,4 +38,4 @@ Agent(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
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).
|
||||||
|
|||||||
35
docs/tools/FileWriteTool.md
Normal file
35
docs/tools/FileWriteTool.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
Here's the rewritten README for the `FileWriterTool`:
|
||||||
|
|
||||||
|
# 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.
|
||||||
@@ -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.
|
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.
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
The second task goal was:
|
The second task goal was:
|
||||||
@@ -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.
|
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.
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|||||||
57
mkdocs.yml
57
mkdocs.yml
@@ -151,34 +151,35 @@ nav:
|
|||||||
- Conditional Tasks: 'how-to/Conditional-Tasks.md'
|
- Conditional Tasks: 'how-to/Conditional-Tasks.md'
|
||||||
- Agent Monitoring with AgentOps: 'how-to/AgentOps-Observability.md'
|
- Agent Monitoring with AgentOps: 'how-to/AgentOps-Observability.md'
|
||||||
- Agent Monitoring with LangTrace: 'how-to/Langtrace-Observability.md'
|
- Agent Monitoring with LangTrace: 'how-to/Langtrace-Observability.md'
|
||||||
- Tools Docs:
|
- Tools Docs:
|
||||||
- Google Serper Search: 'tools/SerperDevTool.md'
|
- Browserbase Web Loader: 'tools/BrowserbaseLoadTool.md'
|
||||||
- Browserbase Web Loader: 'tools/BrowserbaseLoadTool.md'
|
- Code Docs RAG Search: 'tools/CodeDocsSearchTool.md'
|
||||||
- Composio Tools: 'tools/ComposioTool.md'
|
- Code Interpreter: 'tools/CodeInterpreterTool.md'
|
||||||
- Code Interpreter: 'tools/CodeInterpreterTool.md'
|
- Composio Tools: 'tools/ComposioTool.md'
|
||||||
- Scrape Website: 'tools/ScrapeWebsiteTool.md'
|
- CSV RAG Search: 'tools/CSVSearchTool.md'
|
||||||
- Directory Read: 'tools/DirectoryReadTool.md'
|
- DALL-E Tool: 'tools/DALL-ETool.md'
|
||||||
- Exa Serch Web Loader: 'tools/EXASearchTool.md'
|
- Directory RAG Search: 'tools/DirectorySearchTool.md'
|
||||||
- File Read: 'tools/FileReadTool.md'
|
- Directory Read: 'tools/DirectoryReadTool.md'
|
||||||
- Selenium Scraper: 'tools/SeleniumScrapingTool.md'
|
- Docx Rag Search: 'tools/DOCXSearchTool.md'
|
||||||
- Directory RAG Search: 'tools/DirectorySearchTool.md'
|
- EXA Serch Web Loader: 'tools/EXASearchTool.md'
|
||||||
- DALL-E Tool: 'tools/DALL-ETool.md'
|
- File Read: 'tools/FileReadTool.md'
|
||||||
- PDF RAG Search: 'tools/PDFSearchTool.md'
|
- File Write: 'tools/FileWriteTool.md'
|
||||||
- TXT RAG Search: 'tools/TXTSearchTool.md'
|
- Github RAG Search: 'tools/GitHubSearchTool.md'
|
||||||
- CSV RAG Search: 'tools/CSVSearchTool.md'
|
- Google Serper Search: 'tools/SerperDevTool.md'
|
||||||
- XML RAG Search: 'tools/XMLSearchTool.md'
|
- JSON RAG Search: 'tools/JSONSearchTool.md'
|
||||||
- JSON RAG Search: 'tools/JSONSearchTool.md'
|
- MDX RAG Search: 'tools/MDXSearchTool.md'
|
||||||
- Docx Rag Search: 'tools/DOCXSearchTool.md'
|
- MySQL Tool: 'tools/MySQLTool.md'
|
||||||
- MDX RAG Search: 'tools/MDXSearchTool.md'
|
- NL2SQL Tool: 'tools/NL2SQLTool.md'
|
||||||
- MySQL Tool: 'tools/MySQLTool.md'
|
- PDF RAG Search: 'tools/PDFSearchTool.md'
|
||||||
- NL2SQL Tool: 'tools/NL2SQLTool.md'
|
- PG RAG Search: 'tools/PGSearchTool.md'
|
||||||
- PG RAG Search: 'tools/PGSearchTool.md'
|
- Scrape Website: 'tools/ScrapeWebsiteTool.md'
|
||||||
- Vision Tool: 'tools/VisionTool.md'
|
- Selenium Scraper: 'tools/SeleniumScrapingTool.md'
|
||||||
- Website RAG Search: 'tools/WebsiteSearchTool.md'
|
- TXT RAG Search: 'tools/TXTSearchTool.md'
|
||||||
- Github RAG Search: 'tools/GitHubSearchTool.md'
|
- Vision Tool: 'tools/VisionTool.md'
|
||||||
- Code Docs RAG Search: 'tools/CodeDocsSearchTool.md'
|
- Website RAG Search: 'tools/WebsiteSearchTool.md'
|
||||||
- Youtube Video RAG Search: 'tools/YoutubeVideoSearchTool.md'
|
- XML RAG Search: 'tools/XMLSearchTool.md'
|
||||||
- Youtube Channel RAG Search: 'tools/YoutubeChannelSearchTool.md'
|
- Youtube Channel RAG Search: 'tools/YoutubeChannelSearchTool.md'
|
||||||
|
- Youtube Video RAG Search: 'tools/YoutubeVideoSearchTool.md'
|
||||||
- Examples:
|
- Examples:
|
||||||
- Trip Planner Crew: https://github.com/joaomdmoura/crewAI-examples/tree/main/trip_planner"
|
- 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"
|
- Create Instagram Post: https://github.com/joaomdmoura/crewAI-examples/tree/main/instagram_post"
|
||||||
|
|||||||
Reference in New Issue
Block a user