Skip to main content

ImageAgent

Defined in the Image Agent module.
AI Agent A specialized agent for generating images using AI models. This agent extends the base Agent class with specific functionality for image generation, including support for different models, sizes, and quality settings.

Constructor

name
Optional
No description available.
role
Optional
No description available.
goal
Optional
No description available.
backstory
Optional
No description available.
instructions
Optional
No description available.
llm
Optional
No description available.
style
str
default:"'natural'"
No description available.
response_format
str
default:"'url'"
No description available.
timeout
int
default:"600"
No description available.
api_base
Optional
No description available.
api_key
Optional
No description available.
api_version
Optional
No description available.
verbose
Union
default:"True"
No description available.

Methods

litellm()

Lazy load litellm module when needed.

generate_image()

Generate an image based on the provided prompt.

agenerate_image()

Async wrapper for generate_image.

generate()

Alias for generate_image() - for consistency with VideoAgent/AudioAgent.

agenerate()

Async alias for generate_image().

chat()

Generate an image from the prompt.

achat()

Async chat method for image generation.

edit()

Edit an existing image with a prompt.

aedit()

Async version of edit().

variation()

Generate variations of an existing image.

avariation()

Async version of variation().

Source

View on GitHub

praisonaiagents/agent/image_agent.py at line 24

Agents Concept

Single Agent Guide

Multi-Agent Guide

Agent Configuration

Auto Agents