Skip to content

FireworksImageModel

Namespace: Vercel.AI.Fireworks

public sealed class FireworksImageModel : IImageModel

Fireworks image model. Sync models return bytes. Kontext models poll get_result.

Inheritance: object

Implements: IImageModel

View source

FireworksImageModel(FireworksProvider, string)

Section titled “FireworksImageModel(FireworksProvider, string)”
public FireworksImageModel(FireworksProvider provider, string modelId)

Creates an image model.

Parameters

Name Type Description
provider FireworksProvider
modelId string

View source

public Func<DateTimeOffset>? Clock { get; set; }

Clock used for the response timestamp. Defaults to UTC now.

Value: Func<DateTimeOffset>

View source

public int MaxImagesPerCall { get; }

Fireworks returns one image per call.

Value: int

View source

public string ModelId { get; }

Model id.

Value: string

View source

public TimeSpan PollInterval { get; set; }

Delay between async polls.

Value: TimeSpan

View source

public TimeSpan PollTimeout { get; set; }

How long async polling may run.

Value: TimeSpan

View source

public string Provider { get; }

Provider id.

Value: string

View source

DoGenerateAsync(ImageCallOptions, CancellationToken)

Section titled “DoGenerateAsync(ImageCallOptions, CancellationToken)”
public Task<ImageGenerationResult> DoGenerateAsync(ImageCallOptions options, CancellationToken cancellationToken)

Generates images. Maps to doGenerate on an image model.

Parameters

Name Type Description
options ImageCallOptions
cancellationToken CancellationToken

Returns: Task<ImageGenerationResult>

View source

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