Skip to content

ImageModelResult

Namespace: Vercel.AI.Operations

public sealed class ImageModelResult

One doGenerate result.

Inheritance: object

View source

ImageModelResult(IReadOnlyList<object?>, IReadOnlyList<OperationWarning>?, OperationUsage?, JsonElement?, ProviderResponse?, bool?)

Section titled “ImageModelResult(IReadOnlyList<object?>, IReadOnlyList<OperationWarning>?, OperationUsage?, JsonElement?, ProviderResponse?, bool?)”
public ImageModelResult(IReadOnlyList<object?> images, IReadOnlyList<OperationWarning>? warnings = null, OperationUsage? usage = null, JsonElement? providerMetadata = null, ProviderResponse? response = null, bool? isRetryable = null)

Creates a result.

Parameters

Name Type Description
images IReadOnlyList<object>
warnings IReadOnlyList<OperationWarning>
usage OperationUsage
providerMetadata JsonElement?
response ProviderResponse
isRetryable bool?

View source

public IReadOnlyList<object?> Images { get; }

Image payloads: base64 strings or byte arrays.

Value: IReadOnlyList<object>

View source

public bool? IsRetryable { get; }

When false, an empty image list is terminal.

Value: bool?

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata, including per-image arrays.

Value: JsonElement?

View source

public ProviderResponse Response { get; }

Response metadata.

Value: ProviderResponse

View source

public OperationUsage? Usage { get; }

Token usage. Null when the provider omitted it.

Value: OperationUsage

View source

public IReadOnlyList<OperationWarning> Warnings { get; }

Warnings from this call.

Value: IReadOnlyList<OperationWarning>

View source

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