Class: AWSCDK::Bedrock::CfnPromptVersion::ToolProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPromptVersion::ToolProperty
- Defined in:
- bedrock/cfn_prompt_version.rb
Overview
Information about a tool that you can use with the Converse API.
For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.
Instance Attribute Summary collapse
-
#cache_point ⇒ AWSCDK::IResolvable, ...
readonly
CachePoint to include in the tool configuration.
-
#tool_spec ⇒ AWSCDK::IResolvable, ...
readonly
The specfication for the tool.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_point: nil, tool_spec: nil) ⇒ ToolProperty
constructor
A new instance of ToolProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_point: nil, tool_spec: nil) ⇒ ToolProperty
Returns a new instance of ToolProperty.
1478 1479 1480 1481 1482 1483 |
# File 'bedrock/cfn_prompt_version.rb', line 1478 def initialize(cache_point: nil, tool_spec: nil) @cache_point = cache_point.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::CachePointBlockProperty.new(**cache_point.transform_keys(&:to_sym)) : cache_point Jsii::Type.check_type(@cache_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uQ2FjaGVQb2ludEJsb2NrUHJvcGVydHkifV19fQ==")), "cachePoint") unless @cache_point.nil? @tool_spec = tool_spec.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::ToolSpecificationProperty.new(**tool_spec.transform_keys(&:to_sym)) : tool_spec Jsii::Type.check_type(@tool_spec, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uVG9vbFNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "toolSpec") unless @tool_spec.nil? end |
Instance Attribute Details
#cache_point ⇒ AWSCDK::IResolvable, ... (readonly)
CachePoint to include in the tool configuration.
1489 1490 1491 |
# File 'bedrock/cfn_prompt_version.rb', line 1489 def cache_point @cache_point end |
#tool_spec ⇒ AWSCDK::IResolvable, ... (readonly)
The specfication for the tool.
1494 1495 1496 |
# File 'bedrock/cfn_prompt_version.rb', line 1494 def tool_spec @tool_spec end |
Class Method Details
.jsii_properties ⇒ Object
1496 1497 1498 1499 1500 1501 |
# File 'bedrock/cfn_prompt_version.rb', line 1496 def self.jsii_properties { :cache_point => "cachePoint", :tool_spec => "toolSpec", } end |
Instance Method Details
#to_jsii ⇒ Object
1503 1504 1505 1506 1507 1508 1509 1510 |
# File 'bedrock/cfn_prompt_version.rb', line 1503 def to_jsii result = {} result.merge!({ "cachePoint" => @cache_point, "toolSpec" => @tool_spec, }) result.compact end |