Skip to content

ImageGenerationResult

Namespace: Vercel.AI.Provider

public class ImageGenerationResult

Image generation result.

Inheritance: object

Derived: LumaImageGeneration

View source

ImageGenerationResult(IReadOnlyList<GeneratedImage>, IReadOnlyList<CallWarning>?, ImageResponseInfo?, LanguageModelUsage?, JsonElement?, bool?)

Section titled “ImageGenerationResult(IReadOnlyList<GeneratedImage>, IReadOnlyList<CallWarning>?, ImageResponseInfo?, LanguageModelUsage?, JsonElement?, bool?)”
public ImageGenerationResult(IReadOnlyList<GeneratedImage> images, IReadOnlyList<CallWarning>? warnings = null, ImageResponseInfo? response = null, LanguageModelUsage? usage = null, JsonElement? providerMetadata = null, bool? isRetryable = null)

Creates an image result.

Parameters

Name Type Description
images IReadOnlyList<GeneratedImage>
warnings IReadOnlyList<CallWarning>
response ImageResponseInfo
usage LanguageModelUsage
providerMetadata JsonElement?
isRetryable bool?

View source

public IReadOnlyList<CallWarning> CallWarnings { get; }

Warnings of this call. Maps to warnings.

Value: IReadOnlyList<CallWarning>

View source

public IReadOnlyList<GeneratedImage> Images { get; }

Generated images.

Value: IReadOnlyList<GeneratedImage>

View source

public bool? IsRetryable { get; }

<a href=“https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool"&gt;false&lt;/a> when an empty result must not be retried. Maps to isRetryable.

Value: bool?

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata of this call, keyed by provider name. Maps to providerMetadata.

Value: JsonElement?

View source

public ImageResponseInfo? Response { get; }

Response metadata of this call, when the model reports it.

Value: ImageResponseInfo

View source

public LanguageModelUsage? Usage { get; }

Token usage, when the response included it.

Value: LanguageModelUsage

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product