SmartPictureBoxAdapter
Wisej.AI.Adapters.SmartPictureBoxAdapter
Last updated
Wisej.AI.Adapters.SmartPictureBoxAdapter
Last updated
Namespace: Wisej.AI.Adapters
Assembly: Wisej.AI (3.5.0.0)
Represents an adapter for a PictureBox that generates images based on a description using the OpenAI DALL-E endpoint.
This adapter extends the functionality of a PictureBox by allowing it to generate images from text descriptions. It works with the OpenAI DALL-E endpoint and supports different image formats and sizes.
Initializes a new instance of .
: Gets or sets the format in which the generated images are returned. Must be one of "url" or "b64_json". (Default: "url"
)
For DALL-E-2, image sizes must be one of "256x256", "512x512", or "1024x1024". When using DALL-E-3, images can have a size of 1024x1024, 1024x1792, or 1792x1024 pixels.
Handles the event when the control is created.
control
The control that was created.
Handles the event when the control is disposed.
control
The control that was disposed.
Asynchronously runs the core logic for generating an image based on the control's text.
control
The control containing the text description.
Throws:
Represents a provider that supplies tools.
: Gets or sets the size of the generated images. Must be one of "256x256", "512x512", or "1024x1024". Smaller images are faster. (Default: "1024x1024"
)
Returns: . A task representing the asynchronous operation, with a result containing the generated image or image URL.
Thrown when the control is null.