Class: AWSCDK::BedrockAgentCore::CfnHarness::HarnessGeminiModelConfigProperty

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(api_key_arn:, model_id:, max_tokens: nil, temperature: nil, top_k: nil, top_p: nil) ⇒ HarnessGeminiModelConfigProperty

Returns a new instance of HarnessGeminiModelConfigProperty.

Parameters:

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


1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'bedrock_agent_core/cfn_harness.rb', line 1574

def initialize(api_key_arn:, model_id:, max_tokens: nil, temperature: nil, top_k: nil, top_p: nil)
  @api_key_arn = api_key_arn
  Jsii::Type.check_type(@api_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiKeyArn")
  @model_id = model_id
  Jsii::Type.check_type(@model_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelId")
  @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_k = top_k
  Jsii::Type.check_type(@top_k, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "topK") unless @top_k.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_key_arnString (readonly)



1591
1592
1593
# File 'bedrock_agent_core/cfn_harness.rb', line 1591

def api_key_arn
  @api_key_arn
end

#max_tokensNumeric? (readonly)



1597
1598
1599
# File 'bedrock_agent_core/cfn_harness.rb', line 1597

def max_tokens
  @max_tokens
end

#model_idString (readonly)



1594
1595
1596
# File 'bedrock_agent_core/cfn_harness.rb', line 1594

def model_id
  @model_id
end

#temperatureNumeric? (readonly)



1600
1601
1602
# File 'bedrock_agent_core/cfn_harness.rb', line 1600

def temperature
  @temperature
end

#top_kNumeric? (readonly)



1603
1604
1605
# File 'bedrock_agent_core/cfn_harness.rb', line 1603

def top_k
  @top_k
end

#top_pNumeric? (readonly)



1606
1607
1608
# File 'bedrock_agent_core/cfn_harness.rb', line 1606

def top_p
  @top_p
end

Class Method Details

.jsii_propertiesObject



1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'bedrock_agent_core/cfn_harness.rb', line 1608

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

Instance Method Details

#to_jsiiObject



1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
# File 'bedrock_agent_core/cfn_harness.rb', line 1619

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