Class: AWSCDK::Bedrock::CfnPromptVersion::ToolSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPromptVersion::ToolSpecificationProperty
- Defined in:
- bedrock/cfn_prompt_version.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::CfnPromptVersion::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.
1524 1525 1526 1527 1528 1529 1530 1531 |
# File 'bedrock/cfn_prompt_version.rb', line 1524 def initialize(input_schema:, name:, description: nil) @input_schema = input_schema.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::ToolInputSchemaProperty.new(**input_schema.transform_keys(&:to_sym)) : input_schema Jsii::Type.check_type(@input_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uVG9vbElucHV0U2NoZW1hUHJvcGVydHkifV19fQ==")), "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.
1547 1548 1549 |
# File 'bedrock/cfn_prompt_version.rb', line 1547 def description @description end |
#input_schema ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnPromptVersion::ToolInputSchemaProperty (readonly)
The input schema for the tool in JSON format.
1537 1538 1539 |
# File 'bedrock/cfn_prompt_version.rb', line 1537 def input_schema @input_schema end |
#name ⇒ String (readonly)
The name for the tool.
1542 1543 1544 |
# File 'bedrock/cfn_prompt_version.rb', line 1542 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
1549 1550 1551 1552 1553 1554 1555 |
# File 'bedrock/cfn_prompt_version.rb', line 1549 def self.jsii_properties { :input_schema => "inputSchema", :name => "name", :description => "description", } end |
Instance Method Details
#to_jsii ⇒ Object
1557 1558 1559 1560 1561 1562 1563 1564 1565 |
# File 'bedrock/cfn_prompt_version.rb', line 1557 def to_jsii result = {} result.merge!({ "inputSchema" => @input_schema, "name" => @name, "description" => @description, }) result.compact end |