Skip to content

BedrockMantleProvider

Namespace: Vercel.AI.AmazonBedrock

public sealed class BedrockMantleProvider : ProviderBase

Bedrock Mantle provider. Chat calls use /chat/completions and are signed for bedrock-mantle.

Inheritance: object → ProviderBase

View source

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

View source

public const string ProviderId = "bedrock-mantle.chat"

Provider id.

Value: string

View source

public HttpClient HttpClient { get; }

HTTP client that receives the signed request.

Value: HttpClient

View source

public BedrockMantleOptions Options { get; }

Options.

Value: BedrockMantleOptions

View source

public ILanguageModel Chat(string modelId)

Chat Completions model. Same route as LanguageModel(string).

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

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

View source

public override IEmbeddingModel EmbeddingModel(string modelId)

Mantle has no embedding models.

Parameters

Name Type Description
modelId string

Returns: IEmbeddingModel

View source

public override IImageModel ImageModel(string modelId)

Mantle has no image models.

Parameters

Name Type Description
modelId string

Returns: IImageModel

View source

public override ILanguageModel LanguageModel(string modelId)

Returns a language model.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

public ILanguageModel New(string modelId)

Throws because the JavaScript provider function rejects new.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

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

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product