class DefaultPromptRouterIdentifier
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.DefaultPromptRouterIdentifier |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#DefaultPromptRouterIdentifier |
![]() | software.amazon.awscdk.services.bedrock.alpha.DefaultPromptRouterIdentifier |
![]() | aws_cdk.aws_bedrock_alpha.DefaultPromptRouterIdentifier |
![]() | @aws-cdk/aws-bedrock-alpha ยป DefaultPromptRouterIdentifier |
Represents identifiers for default prompt routers in Bedrock.
These are pre-configured routers provided by AWS that route between different models in the same family for optimal performance and cost.
Example
// Create a prompt router for intelligent model selection
const promptRouter = bedrock.PromptRouter.fromDefaultId(
bedrock.DefaultPromptRouterIdentifier.ANTHROPIC_CLAUDE_V1,
'us-east-1'
);
// Use the prompt router with a prompt variant
const variant = bedrock.PromptVariant.text({
variantName: 'variant1',
promptText: 'What is the capital of France?',
model: promptRouter,
});
new bedrock.Prompt(this, 'Prompt', {
promptName: 'prompt-router-test',
variants: [variant],
});
Properties
Name | Type | Description |
---|---|---|
prompt | string | The unique identifier for this prompt router. |
routing | Bedrock [] | The foundation models that this router can route between. |
static ANTHROPIC_CLAUDE_V1 | Default | Anthropic Claude V1 router configuration. |
static META_LLAMA_3_1 | Default | Meta Llama 3.1 router configuration. Routes between different sizes of Llama 3.1 models (8B and 70B) for optimal performance based on request complexity. |
promptRouterId
Type:
string
The unique identifier for this prompt router.
routingModels
Type:
Bedrock
[]
The foundation models that this router can route between.
static ANTHROPIC_CLAUDE_V1
Type:
Default
Anthropic Claude V1 router configuration.
Routes between Claude Haiku and Claude 3.5 Sonnet models for optimal balance between performance and cost.
static META_LLAMA_3_1
Type:
Default
Meta Llama 3.1 router configuration. Routes between different sizes of Llama 3.1 models (8B and 70B) for optimal performance based on request complexity.