BedrockMantleProvider
Namespace: Vercel.AI.AmazonBedrock
public sealed class BedrockMantleProvider : ProviderBaseBedrock Mantle provider. Chat calls use /chat/completions and are signed for bedrock-mantle.
Inheritance: object → ProviderBase
Constructors
Section titled “Constructors”BedrockMantleProvider(HttpClient, BedrockMantleOptions?)
Section titled “BedrockMantleProvider(HttpClient, BedrockMantleOptions?)”public BedrockMantleProvider(HttpClient httpClient, BedrockMantleOptions? options = null)Creates a provider.
Parameters
| Name | Type | Description |
|---|---|---|
httpClient |
HttpClient | |
options |
BedrockMantleOptions |
Fields
Section titled “Fields”ProviderId
Section titled “ProviderId”public const string ProviderId = "bedrock-mantle.chat"Provider id.
Value: string
Properties
Section titled “Properties”HttpClient
Section titled “HttpClient”public HttpClient HttpClient { get; }HTTP client that receives the signed request.
Value: HttpClient
Options
Section titled “Options”public BedrockMantleOptions Options { get; }Options.
Value: BedrockMantleOptions
Methods
Section titled “Methods”Chat(string)
Section titled “Chat(string)”public ILanguageModel Chat(string modelId)Chat Completions model. Same route as LanguageModel(string).
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: ILanguageModel
Create(BedrockMantleOptions?, HttpMessageHandler?)
Section titled “Create(BedrockMantleOptions?, HttpMessageHandler?)”public static BedrockMantleProvider Create(BedrockMantleOptions? options = null, HttpMessageHandler? handler = null)Creates a provider. Pass a handler from tests.
Parameters
| Name | Type | Description |
|---|---|---|
options |
BedrockMantleOptions | |
handler |
HttpMessageHandler |
Returns: BedrockMantleProvider
EmbeddingModel(string)
Section titled “EmbeddingModel(string)”public override IEmbeddingModel EmbeddingModel(string modelId)Mantle has no embedding models.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: IEmbeddingModel
ImageModel(string)
Section titled “ImageModel(string)”public override IImageModel ImageModel(string modelId)Mantle has no image models.
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
New(string)
Section titled “New(string)”public ILanguageModel New(string modelId)Throws because the JavaScript provider function rejects new.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: ILanguageModel
Responses(string)
Section titled “Responses(string)”public ILanguageModel Responses(string modelId)Responses API model. The path is /responses on the same Mantle origin.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string |
Returns: ILanguageModel
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product