generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructsDocs


@cdklabs/generative-ai-cdk-constructs / bedrock / BedrockFoundationModel

Class: BedrockFoundationModel

Bedrock models.

If you need to use a model name that doesn’t exist as a static member, you can instantiate a BedrockFoundationModel object, e.g: new BedrockFoundationModel('my-model').

Implements

Constructors

new BedrockFoundationModel()

new BedrockFoundationModel(value, props): BedrockFoundationModel

Parameters

value: string

props: BedrockFoundationModelProps = {}

Returns

BedrockFoundationModel

Properties

invokableArn

readonly invokableArn: string

The ARN of the Bedrock invokable abstraction.

Implementation of

IInvokable.invokableArn


modelArn

readonly modelArn: string


modelId

readonly modelId: string


                       Constructor *************************************************************************

supportsAgents

readonly supportsAgents: boolean


supportsCrossRegion

readonly supportsCrossRegion: boolean


supportsKnowledgeBase

readonly supportsKnowledgeBase: boolean


vectorDimensions?

readonly optional vectorDimensions: number


AMAZON_TITAN_PREMIER_V1_0

readonly static AMAZON_TITAN_PREMIER_V1_0: BedrockFoundationModel


AMAZON_TITAN_TEXT_EXPRESS_V1

readonly static AMAZON_TITAN_TEXT_EXPRESS_V1: BedrockFoundationModel


                       AMAZON *************************************************************************

ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0

readonly static ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0: BedrockFoundationModel


ANTHROPIC_CLAUDE_3_5_SONNET_V1_0

readonly static ANTHROPIC_CLAUDE_3_5_SONNET_V1_0: BedrockFoundationModel


ANTHROPIC_CLAUDE_3_5_SONNET_V2_0

readonly static ANTHROPIC_CLAUDE_3_5_SONNET_V2_0: BedrockFoundationModel


                       ANTHROPIC *************************************************************************

ANTHROPIC_CLAUDE_HAIKU_V1_0

readonly static ANTHROPIC_CLAUDE_HAIKU_V1_0: BedrockFoundationModel


ANTHROPIC_CLAUDE_INSTANT_V1_2

readonly static ANTHROPIC_CLAUDE_INSTANT_V1_2: BedrockFoundationModel


ANTHROPIC_CLAUDE_OPUS_V1_0

readonly static ANTHROPIC_CLAUDE_OPUS_V1_0: BedrockFoundationModel


ANTHROPIC_CLAUDE_SONNET_V1_0

readonly static ANTHROPIC_CLAUDE_SONNET_V1_0: BedrockFoundationModel


ANTHROPIC_CLAUDE_V2

readonly static ANTHROPIC_CLAUDE_V2: BedrockFoundationModel


ANTHROPIC_CLAUDE_V2_1

readonly static ANTHROPIC_CLAUDE_V2_1: BedrockFoundationModel


COHERE_EMBED_ENGLISH_V3

readonly static COHERE_EMBED_ENGLISH_V3: BedrockFoundationModel


                       COHERE *************************************************************************

COHERE_EMBED_MULTILINGUAL_V3

readonly static COHERE_EMBED_MULTILINGUAL_V3: BedrockFoundationModel


META_LLAMA_3_2_11B_INSTRUCT_V1

readonly static META_LLAMA_3_2_11B_INSTRUCT_V1: BedrockFoundationModel


                       META *************************************************************************

META_LLAMA_3_2_1B_INSTRUCT_V1

readonly static META_LLAMA_3_2_1B_INSTRUCT_V1: BedrockFoundationModel


META_LLAMA_3_2_3B_INSTRUCT_V1

readonly static META_LLAMA_3_2_3B_INSTRUCT_V1: BedrockFoundationModel


TITAN_EMBED_TEXT_V1

readonly static TITAN_EMBED_TEXT_V1: BedrockFoundationModel


TITAN_EMBED_TEXT_V2_1024

readonly static TITAN_EMBED_TEXT_V2_1024: BedrockFoundationModel


TITAN_EMBED_TEXT_V2_256

readonly static TITAN_EMBED_TEXT_V2_256: BedrockFoundationModel


TITAN_EMBED_TEXT_V2_512

readonly static TITAN_EMBED_TEXT_V2_512: BedrockFoundationModel

Methods

asArn()

asArn(construct): string

Returns the ARN of the foundation model in the following format: arn:${Partition}:bedrock:${Region}::foundation-model/${ResourceId}

Parameters

construct: IConstruct

Returns

string


asIModel()

asIModel(construct): IModel

Parameters

construct: IConstruct

Returns

IModel


grantInvoke()

grantInvoke(grantee): Grant

Gives the appropriate policies to invoke and use the Foundation Model in the stack region.

Parameters

grantee: IGrantable

Returns

Grant

Implementation of

IInvokable.grantInvoke


grantInvokeAllRegions()

grantInvokeAllRegions(grantee): Grant

Gives the appropriate policies to invoke and use the Foundation Model in all regions.

Parameters

grantee: IGrantable

Returns

Grant


toString()

toString(): string

Returns a string representation of an object.

Returns

string


fromCdkFoundationModel()

static fromCdkFoundationModel(modelId, props): BedrockFoundationModel

Parameters

modelId: FoundationModel

props: BedrockFoundationModelProps = {}

Returns

BedrockFoundationModel


fromCdkFoundationModelId()

static fromCdkFoundationModelId(modelId, props): BedrockFoundationModel

Parameters

modelId: FoundationModelIdentifier

props: BedrockFoundationModelProps = {}

Returns

BedrockFoundationModel