Class: AWSCDK::BedrockAgentCore::EvaluatorInferenceConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::EvaluatorInferenceConfig
- Defined in:
- bedrock_agent_core/evaluator_inference_config.rb
Overview
Inference configuration for a custom LLM-as-a-Judge evaluator.
Controls how the foundation model generates evaluation responses.
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) ⇒ EvaluatorInferenceConfig
constructor
A new instance of EvaluatorInferenceConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_tokens: nil, temperature: nil, top_p: nil) ⇒ EvaluatorInferenceConfig
Returns a new instance of EvaluatorInferenceConfig.
12 13 14 15 16 17 18 19 |
# File 'bedrock_agent_core/evaluator_inference_config.rb', line 12 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)
Default: - The foundation model's default maximum token limit is used
The maximum number of tokens to generate in the model response.
25 26 27 |
# File 'bedrock_agent_core/evaluator_inference_config.rb', line 25 def max_tokens @max_tokens end |
#temperature ⇒ Numeric? (readonly)
Default: - The foundation model's default temperature is used
The temperature value that controls randomness in the model's responses.
Higher values produce more diverse outputs. Range: 0.0 to 1.0.
32 33 34 |
# File 'bedrock_agent_core/evaluator_inference_config.rb', line 32 def temperature @temperature end |
#top_p ⇒ Numeric? (readonly)
Default: - The foundation model's default top-p value is used
The top-p sampling parameter that controls the diversity of the model's responses.
Range: 0.0 to 1.0.
39 40 41 |
# File 'bedrock_agent_core/evaluator_inference_config.rb', line 39 def top_p @top_p end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'bedrock_agent_core/evaluator_inference_config.rb', line 41 def self.jsii_properties { :max_tokens => "maxTokens", :temperature => "temperature", :top_p => "topP", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'bedrock_agent_core/evaluator_inference_config.rb', line 49 def to_jsii result = {} result.merge!({ "maxTokens" => @max_tokens, "temperature" => @temperature, "topP" => @top_p, }) result.compact end |