Experimental
@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
PromptRouterProps Struct
Properties for configuring a Prompt Router.
| Stability | Experimental |
|---|---|
| Source | bedrock/inference-profiles/prompt-router.ts |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_alpha from '@aws-cdk/aws-bedrock-alpha';
declare const bedrockFoundationModel: bedrock_alpha.BedrockFoundationModel;
const promptRouterProps: bedrock_alpha.PromptRouterProps = {
promptRouterId: 'promptRouterId',
routingModels: [bedrockFoundationModel],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_alpha as bedrock_alpha
# bedrock_foundation_model: bedrock_alpha.BedrockFoundationModel
prompt_router_props = bedrock_alpha.PromptRouterProps(
prompt_router_id="promptRouterId",
routing_models=[bedrock_foundation_model]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.alpha.*;
BedrockFoundationModel bedrockFoundationModel;
PromptRouterProps promptRouterProps = PromptRouterProps.builder()
.promptRouterId("promptRouterId")
.routingModels(List.of(bedrockFoundationModel))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Alpha;
BedrockFoundationModel bedrockFoundationModel;
var promptRouterProps = new PromptRouterProps {
PromptRouterId = "promptRouterId",
RoutingModels = new [] { bedrockFoundationModel }
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_alpha "github.com/aws/aws-cdk-go/awsbedrockalpha"
var bedrockFoundationModel BedrockFoundationModel
promptRouterProps := &PromptRouterProps{
PromptRouterId: jsii.String("promptRouterId"),
RoutingModels: []BedrockFoundationModel{
bedrockFoundationModel,
},
}
Properties
promptRouterIdstringprompt_router_idstrpromptRouterIdStringPromptRouterIdstringPromptRouterId*string required #Prompt Router ID that identifies the routing configuration.
routingModelsBedrockFoundationModel[]routing_modelstyping.List[BedrockFoundationModel]routingModelsList<BedrockFoundationModel>RoutingModelsBedrockFoundationModel[]RoutingModels*[]BedrockFoundationModel required #The foundation models this router will route to.
The router will intelligently select between these models based on the request.