Skip to content

AmazonBedrockAnthropicProvider

Namespace: Vercel.AI.AmazonBedrock

public sealed class AmazonBedrockAnthropicProvider : ProviderBase

Anthropic Messages provider hosted on Amazon Bedrock.

Inheritance: object → ProviderBase

View source

AmazonBedrockAnthropicProvider(HttpClient, AmazonBedrockAnthropicOptions?)

Section titled “AmazonBedrockAnthropicProvider(HttpClient, AmazonBedrockAnthropicOptions?)”
public AmazonBedrockAnthropicProvider(HttpClient httpClient, AmazonBedrockAnthropicOptions? options = null)

Creates a provider.

Parameters

Name Type Description
httpClient HttpClient
options AmazonBedrockAnthropicOptions

View source

public const string ProviderId = "bedrock.anthropic.messages"

Provider id.

Value: string

View source

public HttpClient HttpClient { get; }

HTTP client that receives the signed request.

Value: HttpClient

View source

public AmazonBedrockAnthropicOptions Options { get; }

Options.

Value: AmazonBedrockAnthropicOptions

View source

public static IReadOnlyList<string> Tools { get; }

The Anthropic provider tool ids. The same list as Tools.

Value: IReadOnlyList<string>

View source

Create(AmazonBedrockAnthropicOptions?, HttpMessageHandler?)

Section titled “Create(AmazonBedrockAnthropicOptions?, HttpMessageHandler?)”
public static AmazonBedrockAnthropicProvider Create(AmazonBedrockAnthropicOptions? options = null, HttpMessageHandler? handler = null)

Creates a provider. Pass a handler from tests.

Parameters

Name Type Description
options AmazonBedrockAnthropicOptions
handler HttpMessageHandler

Returns: AmazonBedrockAnthropicProvider

View source

public override IEmbeddingModel EmbeddingModel(string modelId)

Bedrock Anthropic has no embedding models.

Parameters

Name Type Description
modelId string

Returns: IEmbeddingModel

View source

public override IImageModel ImageModel(string modelId)

Bedrock Anthropic 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 string ResolveBaseUrl()

Bedrock Runtime origin for these options.

Returns: string

View source

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