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
Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional
No description available.
str
default:"'natural'"
No description available.
str
default:"'url'"
No description available.
int
default:"600"
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Union[bool, int]
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()
Offload the synchronous generation path to keep the event loop responsive.
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()
Offload the synchronous editing path to keep the event loop responsive.
variation()
Generate variations of an existing image.
avariation()
Offload the synchronous variation path to keep the event loop responsive.
Source
View on GitHub
praisonaiagents/agent/image_agent.py at line 23
