Class: AWSCDK::Bedrock::CfnPrompt::ToolProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache_point: nil, tool_spec: nil) ⇒ ToolProperty

Returns a new instance of ToolProperty.

Parameters:



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_pointAWSCDK::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_specAWSCDK::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_propertiesObject



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_jsiiObject



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