OpenAICompatibleImages
Namespace: Vercel.AI.OpenAICompatible
public static class OpenAICompatibleImagesShared image request helpers.
Inheritance: object
Methods
Section titled “Methods”FileContent(ImageModelFile)
Section titled “FileContent(ImageModelFile)”public static ByteArrayContent FileContent(ImageModelFile file)Multipart content for one image file.
Parameters
| Name | Type | Description |
|---|---|---|
file |
ImageModelFile |
Returns: ByteArrayContent
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> |
ReadInt(JsonElement, string)
Section titled “ReadInt(JsonElement, string)”public static int? ReadInt(JsonElement obj, string name)Reads an optional integer field.
Parameters
| Name | Type | Description |
|---|---|---|
obj |
JsonElement | |
name |
string |
Returns: int?
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product