OpenAICompatibleImageModel
Namespace: Vercel.AI.OpenAICompatible
public sealed class OpenAICompatibleImageModel : IImageModelOpenAI-compatible image model.
Inheritance: object
Implements: IImageModel
Constructors
Section titled “Constructors”OpenAICompatibleImageModel(OpenAICompatibleProvider, string, Func<DateTimeOffset>?)
Section titled “OpenAICompatibleImageModel(OpenAICompatibleProvider, string, Func<DateTimeOffset>?)”public OpenAICompatibleImageModel(OpenAICompatibleProvider provider, string modelId, Func<DateTimeOffset>? clock = null)Creates an image model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
OpenAICompatibleProvider | |
modelId |
string | |
clock |
Func<DateTimeOffset> |
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
Methods
Section titled “Methods”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>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product