UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 3.48 kB
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FoundationModel=exports.FoundationModelIdentifier=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class FoundationModelIdentifier{constructor(modelId){this.modelId=modelId}}exports.FoundationModelIdentifier=FoundationModelIdentifier,_a=JSII_RTTI_SYMBOL_1,FoundationModelIdentifier[_a]={fqn:"aws-cdk-lib.aws_bedrock.FoundationModelIdentifier",version:"2.130.0"},FoundationModelIdentifier.AI21_LABS_JURASSIC_2_MID_V1=new FoundationModelIdentifier("ai21.j2-mid-v1"),FoundationModelIdentifier.AI21_LABS_JURASSIC_2_ULTRA_V1=new FoundationModelIdentifier("ai21.j2-ultra-v1"),FoundationModelIdentifier.AMAZON_TITAN_EMBEDDINGS_G1_TEXT_V1=new FoundationModelIdentifier("amazon.titan-embed-text-v1"),FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1=new FoundationModelIdentifier("amazon.titan-text-express-v1"),FoundationModelIdentifier.AMAZON_TITAN_MULTIMODAL_EMBEDDINGS_G1_V1=new FoundationModelIdentifier("amazon.titan-embed-image-v1"),FoundationModelIdentifier.AMAZON_TITAN_IMAGE_GENERATOR_G1_V1=new FoundationModelIdentifier("amazon.titan-image-generator-v1"),FoundationModelIdentifier.ANTHROPIC_CLAUDE_V1=new FoundationModelIdentifier("anthropic.claude-v1"),FoundationModelIdentifier.ANTHROPIC_CLAUDE_V2=new FoundationModelIdentifier("anthropic.claude-v2"),FoundationModelIdentifier.ANTHROPIC_CLAUDE_V2_1=new FoundationModelIdentifier("anthropic.claude-v2:1"),FoundationModelIdentifier.ANTHROPIC_CLAUDE_INSTANT_V1=new FoundationModelIdentifier("anthropic.claude-instant-v1"),FoundationModelIdentifier.COHERE_COMMAND_V14=new FoundationModelIdentifier("cohere.command-text-v14"),FoundationModelIdentifier.COHERE_COMMAND_LIGHT_V14=new FoundationModelIdentifier("cohere.command-light-text-v14"),FoundationModelIdentifier.COHERE_EMBED_ENGLISH_V3=new FoundationModelIdentifier("cohere.embed-english-v3"),FoundationModelIdentifier.COHERE_EMBED_MULTILINGUAL_V3=new FoundationModelIdentifier("cohere.embed-multilingual-v3"),FoundationModelIdentifier.META_LLAMA_2_CHAT_13B_V1=new FoundationModelIdentifier("meta.llama2-13b-chat-v1"),FoundationModelIdentifier.META_LLAMA_2_CHAT_70B_V1=new FoundationModelIdentifier("meta.llama2-70b-chat-v1"),FoundationModelIdentifier.STABILITY_STABLE_DIFFUSION_XL_V0=new FoundationModelIdentifier("stability.stable-diffusion-xl-v0"),FoundationModelIdentifier.STABILITY_STABLE_DIFFUSION_XL_V1=new FoundationModelIdentifier("stability.stable-diffusion-xl-v1");class FoundationModel{static fromFoundationModelId(scope,_id,foundationModelId){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_bedrock_FoundationModelIdentifier(foundationModelId)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromFoundationModelId),error}return new FoundationModel({modelId:foundationModelId.modelId,modelArn:core_1().Stack.of(scope).formatArn({service:"bedrock",account:"",resource:"foundation-model",resourceName:foundationModelId.modelId,arnFormat:core_1().ArnFormat.SLASH_RESOURCE_NAME})})}constructor(props){this.modelId=props.modelId,this.modelArn=props.modelArn}}exports.FoundationModel=FoundationModel,_b=JSII_RTTI_SYMBOL_1,FoundationModel[_b]={fqn:"aws-cdk-lib.aws_bedrock.FoundationModel",version:"2.130.0"};