mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 23:28:30 +00:00
* docs: Fix major memory system documentation issues - Remove misleading deprecation warnings, fix confusing comments, clearly separate three memory approaches, provide accurate examples that match implementation * fix: Correct broken image paths in README - Update crewai_logo.png and asset.png paths to point to docs/images/ directory instead of docs/ directly * docs: Add system prompt transparency and customization guide - Add 'Understanding Default System Instructions' section to address black-box concerns - Document what CrewAI automatically injects into prompts - Provide code examples to inspect complete system prompts - Show 3 methods to override default instructions - Include observability integration examples with Langfuse - Add best practices for production prompt management * docs: Fix implementation accuracy issues in memory documentation - Fix Ollama embedding URL parameter and remove unsupported Cohere input_type parameter * docs: Reference observability docs instead of showing specific tool examples * docs: Reorganize knowledge documentation for better developer experience - Move quickstart examples right after overview for immediate hands-on experience - Create logical learning progression: basics → configuration → advanced → troubleshooting - Add comprehensive agent vs crew knowledge guide with working examples - Consolidate debugging and troubleshooting in dedicated section - Organize best practices by topic in accordion format - Improve content flow from simple concepts to advanced features - Ensure all examples are grounded in actual codebase implementation * docs: enhance custom LLM documentation with comprehensive examples and accurate imports * docs: reorganize observability tools into dedicated section with comprehensive overview and improved navigation * docs: rename how-to section to learn and add comprehensive overview page * docs: finalize documentation reorganization and update navigation labels * docs: enhance README with comprehensive badges, navigation links, and getting started video
73 lines
2.6 KiB
Plaintext
73 lines
2.6 KiB
Plaintext
---
|
|
title: "Image Generation with DALL-E"
|
|
description: "Learn how to use DALL-E for AI-powered image generation in your CrewAI projects"
|
|
icon: "image"
|
|
---
|
|
|
|
CrewAI supports integration with OpenAI's DALL-E, allowing your AI agents to generate images as part of their tasks. This guide will walk you through how to set up and use the DALL-E tool in your CrewAI projects.
|
|
|
|
## Prerequisites
|
|
|
|
- crewAI installed (latest version)
|
|
- OpenAI API key with access to DALL-E
|
|
|
|
## Setting Up the DALL-E Tool
|
|
|
|
<Steps>
|
|
<Step title="Import the DALL-E tool">
|
|
```python
|
|
from crewai_tools import DallETool
|
|
```
|
|
</Step>
|
|
|
|
<Step title="Add the DALL-E tool to your agent configuration">
|
|
```python
|
|
@agent
|
|
def researcher(self) -> Agent:
|
|
return Agent(
|
|
config=self.agents_config['researcher'],
|
|
tools=[SerperDevTool(), DallETool()], # Add DallETool to the list of tools
|
|
allow_delegation=False,
|
|
verbose=True
|
|
)
|
|
```
|
|
</Step>
|
|
</Steps>
|
|
|
|
## Using the DALL-E Tool
|
|
|
|
Once you've added the DALL-E tool to your agent, it can generate images based on text prompts. The tool will return a URL to the generated image, which can be used in the agent's output or passed to other agents for further processing.
|
|
|
|
### Example Agent Configuration
|
|
|
|
```yaml
|
|
role: >
|
|
LinkedIn Profile Senior Data Researcher
|
|
goal: >
|
|
Uncover detailed LinkedIn profiles based on provided name {name} and domain {domain}
|
|
Generate a Dall-e image based on domain {domain}
|
|
backstory: >
|
|
You're a seasoned researcher with a knack for uncovering the most relevant LinkedIn profiles.
|
|
Known for your ability to navigate LinkedIn efficiently, you excel at gathering and presenting
|
|
professional information clearly and concisely.
|
|
```
|
|
|
|
### Expected Output
|
|
|
|
The agent with the DALL-E tool will be able to generate the image and provide a URL in its response. You can then download the image.
|
|
|
|
<Frame>
|
|
<img src="/images/enterprise/dall-e-image.png" alt="DALL-E Image" />
|
|
</Frame>
|
|
|
|
## Best Practices
|
|
|
|
1. **Be specific in your image generation prompts** to get the best results.
|
|
2. **Consider generation time** - Image generation can take some time, so factor this into your task planning.
|
|
3. **Follow usage policies** - Always comply with OpenAI's usage policies when generating images.
|
|
|
|
## Troubleshooting
|
|
|
|
1. **Check API access** - Ensure your OpenAI API key has access to DALL-E.
|
|
2. **Version compatibility** - Check that you're using the latest version of crewAI and crewai-tools.
|
|
3. **Tool configuration** - Verify that the DALL-E tool is correctly added to the agent's tool list. |