ProdiaLanguageModel
Namespace: Vercel.AI.Prodia
public sealed class ProdiaLanguageModel : ILanguageModelProdia image-to-image job exposed as a language model. The last user message supplies the text and the optional input image. The result holds the returned text and images.
Inheritance: object
Implements: ILanguageModel
Constructors
Section titled “Constructors”ProdiaLanguageModel(ProdiaProvider, string, Func<DateTimeOffset>?)
Section titled “ProdiaLanguageModel(ProdiaProvider, string, Func<DateTimeOffset>?)”public ProdiaLanguageModel(ProdiaProvider provider, string modelId, Func<DateTimeOffset>? clock = null)Creates a model. <code class=“paramref”>clock</code> sets the response timestamp.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
ProdiaProvider | |
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, such as openai.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”public string SpecificationVersion { get; }Always V4.
Value: string
Methods
Section titled “Methods”DoGenerateAsync(LanguageModelCallOptions, CancellationToken)
Section titled “DoGenerateAsync(LanguageModelCallOptions, CancellationToken)”public Task<LanguageModelGenerateResult> DoGenerateAsync(LanguageModelCallOptions options, CancellationToken cancellationToken)Generates a complete result.
Parameters
| Name | Type | Description |
|---|---|---|
options |
LanguageModelCallOptions | |
cancellationToken |
CancellationToken |
Returns: Task<LanguageModelGenerateResult>
DoStreamAsync(LanguageModelCallOptions, CancellationToken)
Section titled “DoStreamAsync(LanguageModelCallOptions, CancellationToken)”public Task<LanguageModelStreamResult> DoStreamAsync(LanguageModelCallOptions options, CancellationToken cancellationToken)Runs CancellationToken) and replays the result as stream parts. Generated images are not streamed.
Parameters
| Name | Type | Description |
|---|---|---|
options |
LanguageModelCallOptions | |
cancellationToken |
CancellationToken |
Returns: Task<LanguageModelStreamResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product