ByteDanceProvider
Namespace: Vercel.AI.ByteDance
public sealed class ByteDanceProvider : OpenAICompatibleProviderByteDance provider.
Inheritance: object → ProviderBase → OpenAICompatibleProvider
Constructors
Section titled “Constructors”ByteDanceProvider(HttpClient, OpenAICompatibleOptions?)
Section titled “ByteDanceProvider(HttpClient, OpenAICompatibleOptions?)”public ByteDanceProvider(HttpClient httpClient, OpenAICompatibleOptions? options = null)Creates a provider.
Parameters
| Name | Type | Description |
|---|---|---|
httpClient |
HttpClient | |
options |
OpenAICompatibleOptions |
Fields
Section titled “Fields”DefaultBaseUrl
Section titled “DefaultBaseUrl”public const string DefaultBaseUrl = "https://ark.ap-southeast.bytepluses.com/api/v3"Default API origin.
Value: string
ProviderId
Section titled “ProviderId”public const string ProviderId = "bytedance"Provider id.
Value: string
Methods
Section titled “Methods”Create(OpenAICompatibleOptions?, HttpMessageHandler?)
Section titled “Create(OpenAICompatibleOptions?, HttpMessageHandler?)”public static ByteDanceProvider Create(OpenAICompatibleOptions? options = null, HttpMessageHandler? handler = null)Creates a provider.
Parameters
| Name | Type | Description |
|---|---|---|
options |
OpenAICompatibleOptions | |
handler |
HttpMessageHandler |
Returns: ByteDanceProvider
GenerateImageAsync(string, ImageCallOptions, IDictionary<string, string>?, CancellationToken)
Section titled “GenerateImageAsync(string, ImageCallOptions, IDictionary<string, string>?, CancellationToken)”public Task<ImageGenerationResult> GenerateImageAsync(string modelId, ImageCallOptions options, IDictionary<string, string>? headers, CancellationToken cancellationToken)Posts an image generation. <code class=“paramref”>headers</code> override the provider headers.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string | |
options |
ImageCallOptions | |
headers |
IDictionary<string, string> | |
cancellationToken |
CancellationToken |
Returns: Task<ImageGenerationResult>
ImageModel(string)
Section titled “ImageModel(string)”public override IImageModel ImageModel(string modelId)Returns an image model.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: IImageModel
LanguageModel(string)
Section titled “LanguageModel(string)”public override ILanguageModel LanguageModel(string modelId)Returns a language model.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: ILanguageModel
VideoModel(string)
Section titled “VideoModel(string)”public override IVideoModel VideoModel(string modelId)Returns a video model.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: IVideoModel
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product