Class: AWSCDK::BedrockAgentCore::CfnHarness::HarnessBedrockModelConfigProperty

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_format: nil, max_tokens: nil, temperature: nil, top_p: nil) ⇒ HarnessBedrockModelConfigProperty

Returns a new instance of HarnessBedrockModelConfigProperty.

Parameters:

  • model_id (String)
  • api_format (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)


1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
# File 'bedrock_agent_core/cfn_harness.rb', line 1409

def initialize(model_id:, api_format: 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_format = api_format
  Jsii::Type.check_type(@api_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiFormat") unless @api_format.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_formatString? (readonly)



1427
1428
1429
# File 'bedrock_agent_core/cfn_harness.rb', line 1427

def api_format
  @api_format
end

#max_tokensNumeric? (readonly)



1430
1431
1432
# File 'bedrock_agent_core/cfn_harness.rb', line 1430

def max_tokens
  @max_tokens
end

#model_idString (readonly)



1424
1425
1426
# File 'bedrock_agent_core/cfn_harness.rb', line 1424

def model_id
  @model_id
end

#temperatureNumeric? (readonly)



1433
1434
1435
# File 'bedrock_agent_core/cfn_harness.rb', line 1433

def temperature
  @temperature
end

#top_pNumeric? (readonly)



1436
1437
1438
# File 'bedrock_agent_core/cfn_harness.rb', line 1436

def top_p
  @top_p
end

Class Method Details

.jsii_propertiesObject



1438
1439
1440
1441
1442
1443
1444
1445
1446
# File 'bedrock_agent_core/cfn_harness.rb', line 1438

def self.jsii_properties
  {
    :model_id => "modelId",
    :api_format => "apiFormat",
    :max_tokens => "maxTokens",
    :temperature => "temperature",
    :top_p => "topP",
  }
end

Instance Method Details

#to_jsiiObject



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
# File 'bedrock_agent_core/cfn_harness.rb', line 1448

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