Class: AWSCDK::Bedrock::CfnPrompt::ToolSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPrompt::ToolSpecificationProperty
- Defined in:
- bedrock/cfn_prompt.rb
Overview
The specification for the tool.
For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
The description for the tool.
-
#input_schema ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnPrompt::ToolInputSchemaProperty
readonly
The input schema for the tool in JSON format.
-
#name ⇒ String
readonly
The name for the tool.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input_schema:, name:, description: nil) ⇒ ToolSpecificationProperty
constructor
A new instance of ToolSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(input_schema:, name:, description: nil) ⇒ ToolSpecificationProperty
Returns a new instance of ToolSpecificationProperty.
1594 1595 1596 1597 1598 1599 1600 1601 |
# File 'bedrock/cfn_prompt.rb', line 1594 def initialize(input_schema:, name:, description: nil) @input_schema = input_schema.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPrompt::ToolInputSchemaProperty.new(**input_schema.transform_keys(&:to_sym)) : input_schema Jsii::Type.check_type(@input_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdC5Ub29sSW5wdXRTY2hlbWFQcm9wZXJ0eSJ9XX19")), "inputSchema") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
The description for the tool.
1617 1618 1619 |
# File 'bedrock/cfn_prompt.rb', line 1617 def description @description end |
#input_schema ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnPrompt::ToolInputSchemaProperty (readonly)
The input schema for the tool in JSON format.
1607 1608 1609 |
# File 'bedrock/cfn_prompt.rb', line 1607 def input_schema @input_schema end |
#name ⇒ String (readonly)
The name for the tool.
1612 1613 1614 |
# File 'bedrock/cfn_prompt.rb', line 1612 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
1619 1620 1621 1622 1623 1624 1625 |
# File 'bedrock/cfn_prompt.rb', line 1619 def self.jsii_properties { :input_schema => "inputSchema", :name => "name", :description => "description", } end |
Instance Method Details
#to_jsii ⇒ Object
1627 1628 1629 1630 1631 1632 1633 1634 1635 |
# File 'bedrock/cfn_prompt.rb', line 1627 def to_jsii result = {} result.merge!({ "inputSchema" => @input_schema, "name" => @name, "description" => @description, }) result.compact end |