Skip to content

OpenAICompatibleImages

Namespace: Vercel.AI.OpenAICompatible

public static class OpenAICompatibleImages

Shared image request helpers.

Inheritance: object

View source

public static ByteArrayContent FileContent(ImageModelFile file)

Multipart content for one image file.

Parameters

Name Type Description
file ImageModelFile

Returns: ByteArrayContent

View source

MergeOptions(JsonObject, string, IReadOnlyDictionary<string, JsonElement>?, IList<CallWarning>)

Section titled “MergeOptions(JsonObject, string, IReadOnlyDictionary<string, JsonElement>?, IList<CallWarning>)”
public static void MergeOptions(JsonObject body, string providerId, IReadOnlyDictionary<string, JsonElement>? providerOptions, IList<CallWarning> warnings)

Merges provider options into an image body. Camel-case keys win.

Parameters

Name Type Description
body JsonObject
providerId string
providerOptions IReadOnlyDictionary<string, JsonElement>
warnings IList<CallWarning>

View source

public static int? ReadInt(JsonElement obj, string name)

Reads an optional integer field.

Parameters

Name Type Description
obj JsonElement
name string

Returns: int?

View source

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