Class: AWSCDK::Bedrock::CfnIntelligentPromptRouterProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnIntelligentPromptRouterProps
- Defined in:
- bedrock/cfn_intelligent_prompt_router_props.rb
Overview
Properties for defining a CfnIntelligentPromptRouter.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
An optional description of the prompt router to help identify its purpose.
-
#fallback_model ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnIntelligentPromptRouter::PromptRouterTargetModelProperty
readonly
The default model to use when the routing criteria is not met.
-
#models ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Bedrock::CfnIntelligentPromptRouter::PromptRouterTargetModelProperty>
readonly
A list of foundation models that the prompt router can route requests to.
-
#prompt_router_name ⇒ String
readonly
The name of the prompt router.
-
#routing_criteria ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnIntelligentPromptRouter::RoutingCriteriaProperty
readonly
Routing criteria for a prompt router.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource as tags.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fallback_model:, models:, prompt_router_name:, routing_criteria:, description: nil, tags: nil) ⇒ CfnIntelligentPromptRouterProps
constructor
A new instance of CfnIntelligentPromptRouterProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(fallback_model:, models:, prompt_router_name:, routing_criteria:, description: nil, tags: nil) ⇒ CfnIntelligentPromptRouterProps
Returns a new instance of CfnIntelligentPromptRouterProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 15 def initialize(fallback_model:, models:, prompt_router_name:, routing_criteria:, description: nil, tags: nil) @fallback_model = fallback_model.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnIntelligentPromptRouter::PromptRouterTargetModelProperty.new(**fallback_model.transform_keys(&:to_sym)) : fallback_model Jsii::Type.check_type(@fallback_model, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkludGVsbGlnZW50UHJvbXB0Um91dGVyLlByb21wdFJvdXRlclRhcmdldE1vZGVsUHJvcGVydHkifV19fQ==")), "fallbackModel") @models = models Jsii::Type.check_type(@models, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5JbnRlbGxpZ2VudFByb21wdFJvdXRlci5Qcm9tcHRSb3V0ZXJUYXJnZXRNb2RlbFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "models") @prompt_router_name = prompt_router_name Jsii::Type.check_type(@prompt_router_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "promptRouterName") @routing_criteria = routing_criteria.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnIntelligentPromptRouter::RoutingCriteriaProperty.new(**routing_criteria.transform_keys(&:to_sym)) : routing_criteria Jsii::Type.check_type(@routing_criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkludGVsbGlnZW50UHJvbXB0Um91dGVyLlJvdXRpbmdDcml0ZXJpYVByb3BlcnR5In1dfX0=")), "routingCriteria") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
An optional description of the prompt router to help identify its purpose.
58 59 60 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 58 def description @description end |
#fallback_model ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnIntelligentPromptRouter::PromptRouterTargetModelProperty (readonly)
The default model to use when the routing criteria is not met.
34 35 36 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 34 def fallback_model @fallback_model end |
#models ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Bedrock::CfnIntelligentPromptRouter::PromptRouterTargetModelProperty> (readonly)
A list of foundation models that the prompt router can route requests to.
At least one model must be specified.
41 42 43 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 41 def models @models end |
#prompt_router_name ⇒ String (readonly)
The name of the prompt router.
The name must be unique within your AWS account in the current region.
48 49 50 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 48 def prompt_router_name @prompt_router_name end |
#routing_criteria ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnIntelligentPromptRouter::RoutingCriteriaProperty (readonly)
Routing criteria for a prompt router.
53 54 55 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 53 def routing_criteria @routing_criteria end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource as tags.
You can use tags to categorize and manage your AWS resources.
65 66 67 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 65 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 67 def self.jsii_properties { :fallback_model => "fallbackModel", :models => "models", :prompt_router_name => "promptRouterName", :routing_criteria => "routingCriteria", :description => "description", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'bedrock/cfn_intelligent_prompt_router_props.rb', line 78 def to_jsii result = {} result.merge!({ "fallbackModel" => @fallback_model, "models" => @models, "promptRouterName" => @prompt_router_name, "routingCriteria" => @routing_criteria, "description" => @description, "tags" => @tags, }) result.compact end |