awsbedrock

package
v2.132.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

README

Amazon Bedrock Construct Library

Amazon Bedrock is a fully managed service that offers a choice of foundation models (FMs) along with a broad set of capabilities for building generative AI applications.

CloudFormation does not currently support any Bedrock resource types. This construct library is a collection of constructs that can look up existing Bedrock models for use with other services' CDK constructs, such as AWS Step Functions.

To look up a Bedrock base foundation model:

import "github.com/aws/aws-cdk-go/awscdk"


bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2())

To look up a Bedrock provisioned throughput model:

import bedrock "github.com/aws/aws-cdk-go/awscdk"


bedrock.ProvisionedModel_FromProvisionedModelArn(this, jsii.String("Model"), jsii.String("arn:aws:bedrock:us-east-2:123456789012:provisioned-model/abc-123"))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFoundationModelIdentifier_Override

func NewFoundationModelIdentifier_Override(f FoundationModelIdentifier, modelId *string)

Constructor for foundation model identifier.

Types

type FoundationModel

type FoundationModel interface {
	IModel
	// The foundation model ARN.
	ModelArn() *string
	// The foundation model ID.
	//
	// Example:
	//   "amazon.titan-text-express-v1"
	//
	ModelId() *string
}

A Bedrock base foundation model.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2())

See: https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html

func FoundationModel_FromFoundationModelId

func FoundationModel_FromFoundationModelId(scope constructs.Construct, _id *string, foundationModelId FoundationModelIdentifier) FoundationModel

Construct a Bedrock base foundation model given the model identifier.

Returns: A Bedrock base foundation model. See: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids-arns.html

type FoundationModelIdentifier

type FoundationModelIdentifier interface {
	// the model identifier.
	ModelId() *string
}

The model identifiers for the Bedrock base foundation models.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2())

See: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html

func FoundationModelIdentifier_AI21_LABS_JURASSIC_2_MID_V1

func FoundationModelIdentifier_AI21_LABS_JURASSIC_2_MID_V1() FoundationModelIdentifier

func FoundationModelIdentifier_AI21_LABS_JURASSIC_2_ULTRA_V1

func FoundationModelIdentifier_AI21_LABS_JURASSIC_2_ULTRA_V1() FoundationModelIdentifier

func FoundationModelIdentifier_AMAZON_TITAN_EMBEDDINGS_G1_TEXT_V1

func FoundationModelIdentifier_AMAZON_TITAN_EMBEDDINGS_G1_TEXT_V1() FoundationModelIdentifier

func FoundationModelIdentifier_AMAZON_TITAN_IMAGE_GENERATOR_G1_V1

func FoundationModelIdentifier_AMAZON_TITAN_IMAGE_GENERATOR_G1_V1() FoundationModelIdentifier

func FoundationModelIdentifier_AMAZON_TITAN_MULTIMODAL_EMBEDDINGS_G1_V1

func FoundationModelIdentifier_AMAZON_TITAN_MULTIMODAL_EMBEDDINGS_G1_V1() FoundationModelIdentifier

func FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1

func FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1() FoundationModelIdentifier

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_INSTANT_V1

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_INSTANT_V1() FoundationModelIdentifier

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_V1

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_V1() FoundationModelIdentifier

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2() FoundationModelIdentifier

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2_1

func FoundationModelIdentifier_ANTHROPIC_CLAUDE_V2_1() FoundationModelIdentifier

func FoundationModelIdentifier_COHERE_COMMAND_LIGHT_V14

func FoundationModelIdentifier_COHERE_COMMAND_LIGHT_V14() FoundationModelIdentifier

func FoundationModelIdentifier_COHERE_COMMAND_V14

func FoundationModelIdentifier_COHERE_COMMAND_V14() FoundationModelIdentifier

func FoundationModelIdentifier_COHERE_EMBED_ENGLISH_V3

func FoundationModelIdentifier_COHERE_EMBED_ENGLISH_V3() FoundationModelIdentifier

func FoundationModelIdentifier_COHERE_EMBED_MULTILINGUAL_V3

func FoundationModelIdentifier_COHERE_EMBED_MULTILINGUAL_V3() FoundationModelIdentifier

func FoundationModelIdentifier_META_LLAMA_2_CHAT_13B_V1

func FoundationModelIdentifier_META_LLAMA_2_CHAT_13B_V1() FoundationModelIdentifier

func FoundationModelIdentifier_META_LLAMA_2_CHAT_70B_V1

func FoundationModelIdentifier_META_LLAMA_2_CHAT_70B_V1() FoundationModelIdentifier

func FoundationModelIdentifier_STABILITY_STABLE_DIFFUSION_XL_V0 added in v2.130.0

func FoundationModelIdentifier_STABILITY_STABLE_DIFFUSION_XL_V0() FoundationModelIdentifier

func FoundationModelIdentifier_STABILITY_STABLE_DIFFUSION_XL_V1 added in v2.130.0

func FoundationModelIdentifier_STABILITY_STABLE_DIFFUSION_XL_V1() FoundationModelIdentifier

func NewFoundationModelIdentifier

func NewFoundationModelIdentifier(modelId *string) FoundationModelIdentifier

Constructor for foundation model identifier.

type IModel

Represents a Bedrock model.

The model could be a foundation model, a custom model, or a provisioned model.

func ProvisionedModel_FromProvisionedModelArn

func ProvisionedModel_FromProvisionedModelArn(_scope constructs.Construct, _id *string, provisionedModelArn *string) IModel

Import an provisioned model given an ARN.

type ProvisionedModel

type ProvisionedModel interface {
	IModel
	// The ARN of the provisioned model.
	ModelArn() *string
}

A Bedrock provisioned model.

Note: CloudFormation does not currently support creating Bedrock Provisioned Throughput resources outside of a custom resource. You can import provisioned models created by provisioning throughput in Bedrock outside the CDK or via a custom resource with {@link ProvisionedModel#fromProvisionedModelArn }.

Example:

import bedrock "github.com/aws/aws-cdk-go/awscdk"

bedrock.ProvisionedModel_FromProvisionedModelArn(this, jsii.String("Model"), jsii.String("arn:aws:bedrock:us-east-2:123456789012:provisioned-model/abc-123"))

See: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL