Class: AWSCDK::Bedrock::CfnPrompt::ToolProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPrompt::ToolProperty
- Defined in:
- bedrock/cfn_prompt.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.
1548 1549 1550 1551 1552 1553 |
# File 'bedrock/cfn_prompt.rb', line 1548 def initialize(cache_point: nil, tool_spec: nil) @cache_point = cache_point.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPrompt::CachePointBlockProperty.new(**cache_point.transform_keys(&:to_sym)) : cache_point Jsii::Type.check_type(@cache_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdC5DYWNoZVBvaW50QmxvY2tQcm9wZXJ0eSJ9XX19")), "cachePoint") unless @cache_point.nil? @tool_spec = tool_spec.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPrompt::ToolSpecificationProperty.new(**tool_spec.transform_keys(&:to_sym)) : tool_spec Jsii::Type.check_type(@tool_spec, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdC5Ub29sU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "toolSpec") unless @tool_spec.nil? end |
Instance Attribute Details
#cache_point ⇒ AWSCDK::IResolvable, ... (readonly)
CachePoint to include in the tool configuration.
1559 1560 1561 |
# File 'bedrock/cfn_prompt.rb', line 1559 def cache_point @cache_point end |
#tool_spec ⇒ AWSCDK::IResolvable, ... (readonly)
The specfication for the tool.
1564 1565 1566 |
# File 'bedrock/cfn_prompt.rb', line 1564 def tool_spec @tool_spec end |
Class Method Details
.jsii_properties ⇒ Object
1566 1567 1568 1569 1570 1571 |
# File 'bedrock/cfn_prompt.rb', line 1566 def self.jsii_properties { :cache_point => "cachePoint", :tool_spec => "toolSpec", } end |
Instance Method Details
#to_jsii ⇒ Object
1573 1574 1575 1576 1577 1578 1579 1580 |
# File 'bedrock/cfn_prompt.rb', line 1573 def to_jsii result = {} result.merge!({ "cachePoint" => @cache_point, "toolSpec" => @tool_spec, }) result.compact end |