Class: AWSCDK::BedrockAgentCore::ManagedMemoryStrategy
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::BedrockAgentCore::ManagedMemoryStrategy
- Includes:
- IMemoryStrategy
- Defined in:
- bedrock_agent_core/managed_memory_strategy.rb
Overview
Managed memory strategy that handles both built-in and override configurations.
This strategy can be used for quick setup with built-in defaults or customized with specific models and prompt templates.
Class Method Summary collapse
Instance Method Summary collapse
-
#consolidation_override ⇒ AWSCDK::BedrockAgentCore::OverrideConfig?
The configuration for the custom consolidation.
-
#description ⇒ String?
The description of the memory strategy.
-
#extraction_override ⇒ AWSCDK::BedrockAgentCore::OverrideConfig?
The configuration for the custom extraction.
-
#grant(grantee) ⇒ AWSCDK::IAM::Grant?
Grants the necessary permissions to the role.
-
#initialize(strategy_type, props) ⇒ ManagedMemoryStrategy
constructor
Constructor to create a new managed memory strategy.
-
#namespaces ⇒ Array<String>
The namespaces for the strategy.
-
#reflection_configuration ⇒ AWSCDK::BedrockAgentCore::EpisodicReflectionConfiguration?
The configuration for episodic reflection.
-
#render ⇒ AWSCDK::BedrockAgentCore::CfnMemory::MemoryStrategyProperty
Renders the network configuration as a CloudFormation property.
-
#strategy_name ⇒ String
The name of the memory strategy.
-
#strategy_type ⇒ AWSCDK::BedrockAgentCore::MemoryStrategyType
The type of memory strategy.
Constructor Details
#initialize(strategy_type, props) ⇒ ManagedMemoryStrategy
Constructor to create a new managed memory strategy.
16 17 18 19 20 21 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 16 def initialize(strategy_type, props) props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::ManagedStrategyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(strategy_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5NZW1vcnlTdHJhdGVneVR5cGUifQ==")), "strategyType") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5NYW5hZ2VkU3RyYXRlZ3lQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(strategy_type, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 23 def self.jsii_overridable_methods { :namespaces => { kind: :property, name: "namespaces", is_optional: false }, :strategy_name => { kind: :property, name: "strategyName", is_optional: false }, :strategy_type => { kind: :property, name: "strategyType", is_optional: false }, :consolidation_override => { kind: :property, name: "consolidationOverride", is_optional: true }, :description => { kind: :property, name: "description", is_optional: true }, :extraction_override => { kind: :property, name: "extractionOverride", is_optional: true }, :reflection_configuration => { kind: :property, name: "reflectionConfiguration", is_optional: true }, :grant => { kind: :method, name: "grant", is_optional: false }, :render => { kind: :method, name: "render", is_optional: false }, } end |
Instance Method Details
#consolidation_override ⇒ AWSCDK::BedrockAgentCore::OverrideConfig?
The configuration for the custom consolidation.
61 62 63 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 61 def consolidation_override() jsii_get_property("consolidationOverride") end |
#description ⇒ String?
The description of the memory strategy.
68 69 70 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 68 def description() jsii_get_property("description") end |
#extraction_override ⇒ AWSCDK::BedrockAgentCore::OverrideConfig?
The configuration for the custom extraction.
75 76 77 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 75 def extraction_override() jsii_get_property("extractionOverride") end |
#grant(grantee) ⇒ AWSCDK::IAM::Grant?
Grants the necessary permissions to the role.
[disable-awslint:no-grants]
92 93 94 95 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 92 def grant(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grant", [grantee]) end |
#namespaces ⇒ Array<String>
The namespaces for the strategy.
40 41 42 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 40 def namespaces() jsii_get_property("namespaces") end |
#reflection_configuration ⇒ AWSCDK::BedrockAgentCore::EpisodicReflectionConfiguration?
The configuration for episodic reflection.
82 83 84 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 82 def reflection_configuration() jsii_get_property("reflectionConfiguration") end |
#render ⇒ AWSCDK::BedrockAgentCore::CfnMemory::MemoryStrategyProperty
Renders the network configuration as a CloudFormation property.
100 101 102 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 100 def render() jsii_call_method("render", []) end |
#strategy_name ⇒ String
The name of the memory strategy.
47 48 49 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 47 def strategy_name() jsii_get_property("strategyName") end |
#strategy_type ⇒ AWSCDK::BedrockAgentCore::MemoryStrategyType
The type of memory strategy.
54 55 56 |
# File 'bedrock_agent_core/managed_memory_strategy.rb', line 54 def strategy_type() jsii_get_property("strategyType") end |