Image Config • Rust AI Agent SDK
ImageConfig: Configuration for image generation settings.
ImageConfig
Defined in the agents module.
Rust AI Agent SDK
Configuration for image generation settings.
Fields
| Name | Type | Description |
|---|---|---|
style | String | Style of the generated image |
response_format | String | Response format (url or b64_json) |
timeout | u32 | Timeout in seconds |
size | Option<String> | Image size (e.g., “1024×1024”, “1792×1024”) |
quality | Option<String> | Image quality (standard or hd) |
api_base | Option<String> | API base URL |
api_key | Option<String> | API key |
Methods
new
fn new() -> SelfCreate a new ImageConfig
style
fn style(mut self, style: impl Into<String>) -> SelfSet the style
Parameters:
| Name | Type |
|---|---|
style | impl Into<String> |
size
fn size(mut self, size: impl Into<String>) -> SelfSet the size
Parameters:
| Name | Type |
|---|---|
size | impl Into<String> |
quality
fn quality(mut self, quality: impl Into<String>) -> SelfSet the quality
Parameters:
| Name | Type |
|---|---|
quality | impl Into<String> |
Source
View on GitHubpraisonai/src/agents/mod.rs at line 230