mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
- Update SerperDevTool documentation with accurate parameters and JSON response format - Enhance XMLSearchTool and MDXSearchTool docs with RAG capabilities and required parameters - Fix code block formatting across multiple tool documentation files - Add clarification about environment variables and configuration - Validate all examples against actual implementations - Successfully tested with mkdocs build Co-Authored-By: Joe Moura <joao@crewai.com>
59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
---
|
|
title: DALL-E Tool
|
|
description: The `DallETool` is a powerful tool designed for generating images from textual descriptions.
|
|
icon: image
|
|
---
|
|
|
|
# `DallETool`
|
|
|
|
## Description
|
|
|
|
This tool is used to give the Agent the ability to generate images using the DALL-E model. It is a transformer-based model that generates images from textual descriptions.
|
|
This tool allows the Agent to generate images based on the text input provided by the user.
|
|
|
|
## Installation
|
|
|
|
Install the crewai_tools package
|
|
```shell
|
|
pip install 'crewai[tools]'
|
|
```
|
|
|
|
## Example
|
|
|
|
Remember that when using this tool, the text must be generated by the Agent itself. The text must be a description of the image you want to generate.
|
|
|
|
```python
|
|
from crewai_tools import DallETool
|
|
|
|
Agent(
|
|
...
|
|
tools=[DallETool()],
|
|
)
|
|
```
|
|
|
|
## Arguments
|
|
|
|
- `model`: The DALL-E model to use (e.g., "dall-e-3")
|
|
- `size`: Image size (e.g., "1024x1024")
|
|
- `quality`: Image quality ("standard" or "hd")
|
|
- `n`: Number of images to generate
|
|
|
|
## Configuration Example
|
|
|
|
```python
|
|
from crewai_tools import DallETool
|
|
|
|
dalle_tool = DallETool(model="dall-e-3",
|
|
size="1024x1024",
|
|
quality="standard",
|
|
n=1)
|
|
|
|
Agent(
|
|
...
|
|
tools=[dalle_tool]
|
|
)
|
|
```
|
|
|
|
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).
|