Learn how to use DALL-E for AI-powered image generation in your CrewAI projects
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.
@agentdef 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 )
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.
role: > LinkedIn Profile Senior Data Researchergoal: > 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.