class FoundationModel
Language | Type name |
---|---|
![]() | Amazon.CDK.aws_bedrock.FoundationModel |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrock#FoundationModel |
![]() | software.amazon.awscdk.services.bedrock.FoundationModel |
![]() | aws_cdk.aws_bedrock.FoundationModel |
![]() | aws-cdk-lib » aws_bedrock » FoundationModel |
Implements
IModel
A Bedrock base foundation model.
See also: https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html
Example
import * as bedrock from 'aws-cdk-lib/aws-bedrock';
const model = bedrock.FoundationModel.fromFoundationModelId(
this,
'Model',
bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1,
);
const task = new tasks.BedrockInvokeModel(this, 'Prompt Model', {
model,
input : { s3InputUri: sfn.JsonPath.stringAt('$.prompt') },
output: { s3OutputUri: sfn.JsonPath.stringAt('$.prompt') },
});
Properties
Name | Type | Description |
---|---|---|
model | string | The foundation model ARN. |
model | string | The foundation model ID. |
modelArn
Type:
string
The foundation model ARN.
modelId
Type:
string
The foundation model ID. Example
'amazon.titan-text-express-v1'
Methods
Name | Description |
---|---|
static from | Construct a Bedrock base foundation model given the model identifier. |
static fromFoundationModelId(scope, _id, foundationModelId)
public static fromFoundationModelId(scope: Construct, _id: string, foundationModelId: FoundationModelIdentifier): FoundationModel
Parameters
- scope
Construct
— The parent construct. - _id
string
— The name of the model construct. - foundationModelId
Foundation
— The model identifier such as 'amazon.titan-text-express-v1'.Model Identifier
Returns
Construct a Bedrock base foundation model given the model identifier.
See also: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids-arns.html