Class: AWSCDK::BedrockAgentCore::CfnEvaluator::InferenceConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::CfnEvaluator::InferenceConfigurationProperty
- Defined in:
- bedrock_agent_core/cfn_evaluator.rb
Overview
The inference configuration parameters that control model behavior during evaluation.
Instance Attribute Summary collapse
-
#max_tokens ⇒ Numeric?
readonly
The maximum number of tokens to generate in the model response.
-
#temperature ⇒ Numeric?
readonly
The temperature value that controls randomness in the model's responses.
-
#top_p ⇒ Numeric?
readonly
The top-p sampling parameter that controls the diversity of the model's responses.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_tokens: nil, temperature: nil, top_p: nil) ⇒ InferenceConfigurationProperty
constructor
A new instance of InferenceConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_tokens: nil, temperature: nil, top_p: nil) ⇒ InferenceConfigurationProperty
Returns a new instance of InferenceConfigurationProperty.
818 819 820 821 822 823 824 825 |
# File 'bedrock_agent_core/cfn_evaluator.rb', line 818 def initialize(max_tokens: nil, temperature: nil, top_p: 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
#max_tokens ⇒ Numeric? (readonly)
The maximum number of tokens to generate in the model response.
831 832 833 |
# File 'bedrock_agent_core/cfn_evaluator.rb', line 831 def max_tokens @max_tokens end |
#temperature ⇒ Numeric? (readonly)
The temperature value that controls randomness in the model's responses.
836 837 838 |
# File 'bedrock_agent_core/cfn_evaluator.rb', line 836 def temperature @temperature end |
#top_p ⇒ Numeric? (readonly)
The top-p sampling parameter that controls the diversity of the model's responses.
841 842 843 |
# File 'bedrock_agent_core/cfn_evaluator.rb', line 841 def top_p @top_p end |
Class Method Details
.jsii_properties ⇒ Object
843 844 845 846 847 848 849 |
# File 'bedrock_agent_core/cfn_evaluator.rb', line 843 def self.jsii_properties { :max_tokens => "maxTokens", :temperature => "temperature", :top_p => "topP", } end |
Instance Method Details
#to_jsii ⇒ Object
851 852 853 854 855 856 857 858 859 |
# File 'bedrock_agent_core/cfn_evaluator.rb', line 851 def to_jsii result = {} result.merge!({ "maxTokens" => @max_tokens, "temperature" => @temperature, "topP" => @top_p, }) result.compact end |