Class: AWSCDK::BedrockAgentCore::CfnHarness::HarnessLiteLlmModelConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/cfn_harness.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model_id:, api_base: nil, api_key_arn: nil, max_tokens: nil, temperature: nil, top_p: nil) ⇒ HarnessLiteLlmModelConfigProperty

Returns a new instance of HarnessLiteLlmModelConfigProperty.

Parameters:

  • model_id (String)
  • api_base (String, nil) (defaults to: nil)
  • api_key_arn (String, nil) (defaults to: nil)
  • max_tokens (Numeric, nil) (defaults to: nil)
  • temperature (Numeric, nil) (defaults to: nil)
  • top_p (Numeric, nil) (defaults to: nil)


1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
# File 'bedrock_agent_core/cfn_harness.rb', line 1682

def initialize(model_id:, api_base: nil, api_key_arn: nil, max_tokens: nil, temperature: nil, top_p: nil)
  @model_id = model_id
  Jsii::Type.check_type(@model_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelId")
  @api_base = api_base
  Jsii::Type.check_type(@api_base, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiBase") unless @api_base.nil?
  @api_key_arn = api_key_arn
  Jsii::Type.check_type(@api_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiKeyArn") unless @api_key_arn.nil?
  @max_tokens = max_tokens
  Jsii::Type.check_type(@max_tokens, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxTokens") unless @max_tokens.nil?
  @temperature = temperature
  Jsii::Type.check_type(@temperature, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "temperature") unless @temperature.nil?
  @top_p = top_p
  Jsii::Type.check_type(@top_p, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "topP") unless @top_p.nil?
end

Instance Attribute Details

#api_baseString? (readonly)



1702
1703
1704
# File 'bedrock_agent_core/cfn_harness.rb', line 1702

def api_base
  @api_base
end

#api_key_arnString? (readonly)



1705
1706
1707
# File 'bedrock_agent_core/cfn_harness.rb', line 1705

def api_key_arn
  @api_key_arn
end

#max_tokensNumeric? (readonly)



1708
1709
1710
# File 'bedrock_agent_core/cfn_harness.rb', line 1708

def max_tokens
  @max_tokens
end

#model_idString (readonly)



1699
1700
1701
# File 'bedrock_agent_core/cfn_harness.rb', line 1699

def model_id
  @model_id
end

#temperatureNumeric? (readonly)



1711
1712
1713
# File 'bedrock_agent_core/cfn_harness.rb', line 1711

def temperature
  @temperature
end

#top_pNumeric? (readonly)



1714
1715
1716
# File 'bedrock_agent_core/cfn_harness.rb', line 1714

def top_p
  @top_p
end

Class Method Details

.jsii_propertiesObject



1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
# File 'bedrock_agent_core/cfn_harness.rb', line 1716

def self.jsii_properties
  {
    :model_id => "modelId",
    :api_base => "apiBase",
    :api_key_arn => "apiKeyArn",
    :max_tokens => "maxTokens",
    :temperature => "temperature",
    :top_p => "topP",
  }
end

Instance Method Details

#to_jsiiObject



1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
# File 'bedrock_agent_core/cfn_harness.rb', line 1727

def to_jsii
  result = {}
  result.merge!({
    "modelId" => @model_id,
    "apiBase" => @api_base,
    "apiKeyArn" => @api_key_arn,
    "maxTokens" => @max_tokens,
    "temperature" => @temperature,
    "topP" => @top_p,
  })
  result.compact
end