Class OpenAIImageStreamEvent
public class OpenAIImageStreamEvent : IGenerativeImageEvent, IGenerativeEvent<Texture2D, Generated<Texture2D>>, ITextStreamEvent
- Inheritance
-
objectOpenAIImageStreamEvent
- Implements
-
ITextStreamEvent
Fields
EditCompleted
public const string EditCompleted = "image_edit.completed"
Field Value
- string
EditPartialImage
public const string EditPartialImage = "image_edit.partial_image"
Field Value
- string
GenerationCompleted
public const string GenerationCompleted = "image_generation.completed"
Field Value
- string
GenerationPartialImage
public const string GenerationPartialImage = "image_generation.partial_image"
Field Value
- string
Properties
B64Json
Required. Base64-encoded partial or final image data, suitable for rendering as an image.
public string B64Json { get; set; }
Property Value
- string
Background
Required. The background setting for the requested or generated image.
public ImageBackground? Background { get; set; }
Property Value
CreatedAt
Required. The Unix timestamp when the event was created.
public UnixTime? CreatedAt { get; set; }
Property Value
- UnixTime?
OutputFormat
Required. The output format for the requested or generated image.
public string OutputFormat { get; set; }
Property Value
- string
PartialImageIndex
Optional. 0-based index for the partial image (streaming).
public int? PartialImageIndex { get; set; }
Property Value
- int?
Quality
Required. The quality setting for the requested or generated image.
public ImageQuality? Quality { get; set; }
Property Value
Size
Required. The size of the requested or generated image.
public ImageSize? Size { get; set; }
Property Value
Type
Required. The type of the event.
public string Type { get; set; }
Property Value
- string
Usage
Optional. For gpt-image-1 only, the token usage information for the image generation.
public UsageMetadata Usage { get; set; }
Property Value
Methods
GetChunk()
public Texture2D GetChunk()
Returns
- Texture2D
GetOutput()
public Generated<Texture2D> GetOutput()
Returns
- Generated<Texture2D>
GetUsage()
public UsageMetadata GetUsage()
Returns
IsFinal()
public bool IsFinal()
Returns
- bool