Class: AWSCDK::BedrockAgentCore::ManagedStrategyProps
- Inherits:
-
MemoryStrategyCommonProps
- Object
- MemoryStrategyCommonProps
- AWSCDK::BedrockAgentCore::ManagedStrategyProps
- Defined in:
- bedrock_agent_core/managed_strategy_props.rb
Overview
Configuration parameters for a memory strategy that can override existing built-in default prompts/models.
Instance Attribute Summary collapse
-
#custom_consolidation ⇒ AWSCDK::BedrockAgentCore::OverrideConfig?
readonly
The configuration for the custom consolidation.
-
#custom_extraction ⇒ AWSCDK::BedrockAgentCore::OverrideConfig?
readonly
The configuration for the custom extraction.
-
#description ⇒ String?
readonly
The description of the strategy.
-
#namespaces ⇒ Array<String>
readonly
The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/).
-
#reflection_configuration ⇒ AWSCDK::BedrockAgentCore::EpisodicReflectionConfiguration?
readonly
Configuration for episodic memory reflection (only applicable for EPISODIC strategy type) Defines additional namespaces for reflection-based episodic recall.
-
#strategy_name ⇒ String
readonly
The name for the strategy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(strategy_name:, description: nil, namespaces:, custom_consolidation: nil, custom_extraction: nil, reflection_configuration: nil) ⇒ ManagedStrategyProps
constructor
A new instance of ManagedStrategyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(strategy_name:, description: nil, namespaces:, custom_consolidation: nil, custom_extraction: nil, reflection_configuration: nil) ⇒ ManagedStrategyProps
Returns a new instance of ManagedStrategyProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 13 def initialize(strategy_name:, description: nil, namespaces:, custom_consolidation: nil, custom_extraction: nil, reflection_configuration: nil) @strategy_name = strategy_name Jsii::Type.check_type(@strategy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "strategyName") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @namespaces = namespaces Jsii::Type.check_type(@namespaces, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "namespaces") @custom_consolidation = custom_consolidation.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::OverrideConfig.new(**custom_consolidation.transform_keys(&:to_sym)) : custom_consolidation Jsii::Type.check_type(@custom_consolidation, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5PdmVycmlkZUNvbmZpZyJ9")), "customConsolidation") unless @custom_consolidation.nil? @custom_extraction = custom_extraction.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::OverrideConfig.new(**custom_extraction.transform_keys(&:to_sym)) : custom_extraction Jsii::Type.check_type(@custom_extraction, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5PdmVycmlkZUNvbmZpZyJ9")), "customExtraction") unless @custom_extraction.nil? @reflection_configuration = reflection_configuration.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::EpisodicReflectionConfiguration.new(**reflection_configuration.transform_keys(&:to_sym)) : reflection_configuration Jsii::Type.check_type(@reflection_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5FcGlzb2RpY1JlZmxlY3Rpb25Db25maWd1cmF0aW9uIn0=")), "reflectionConfiguration") unless @reflection_configuration.nil? end |
Instance Attribute Details
#custom_consolidation ⇒ AWSCDK::BedrockAgentCore::OverrideConfig? (readonly)
Default: - No custom extraction
The configuration for the custom consolidation.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
61 62 63 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 61 def custom_consolidation @custom_consolidation end |
#custom_extraction ⇒ AWSCDK::BedrockAgentCore::OverrideConfig? (readonly)
Default: - No custom extraction
The configuration for the custom extraction.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
69 70 71 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 69 def custom_extraction @custom_extraction end |
#description ⇒ String? (readonly)
Default: - No description
The description of the strategy.
36 37 38 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 36 def description @description end |
#namespaces ⇒ Array<String> (readonly)
The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/).
Use a hierarchical format separated by forward slashes (/) to organize namespaces logically. You can include these defined variables:
- sessionId - the user identifier to be created in the CreateEvent API
- memoryStrategyId - an identifier for an extraction strategy
- sessionId - an identifier for each session
Example namespace path: /strategies/memoryStrategyId/actions/actionId/sessions/sessionId
After memory creation, this namespace might look like: /actor/actor-3afc5aa8fef9/strategy/summarization-fy5c5fwc7/session/session-qj7tpd1kvr8
53 54 55 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 53 def namespaces @namespaces end |
#reflection_configuration ⇒ AWSCDK::BedrockAgentCore::EpisodicReflectionConfiguration? (readonly)
Default: - No reflection configuration
Configuration for episodic memory reflection (only applicable for EPISODIC strategy type) Defines additional namespaces for reflection-based episodic recall.
74 75 76 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 74 def reflection_configuration @reflection_configuration end |
#strategy_name ⇒ String (readonly)
The name for the strategy.
31 32 33 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 31 def strategy_name @strategy_name end |
Class Method Details
.jsii_properties ⇒ Object
76 77 78 79 80 81 82 83 84 85 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 76 def self.jsii_properties { :strategy_name => "strategyName", :description => "description", :namespaces => "namespaces", :custom_consolidation => "customConsolidation", :custom_extraction => "customExtraction", :reflection_configuration => "reflectionConfiguration", } end |
Instance Method Details
#to_jsii ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'bedrock_agent_core/managed_strategy_props.rb', line 87 def to_jsii result = {} result.merge!(super) result.merge!({ "strategyName" => @strategy_name, "description" => @description, "namespaces" => @namespaces, "customConsolidation" => @custom_consolidation, "customExtraction" => @custom_extraction, "reflectionConfiguration" => @reflection_configuration, }) result.compact end |