Class: Aws::OpenSearchMemory::Types::MemoryStrategyConfiguration
- Inherits:
-
Struct
- Object
- Struct
- Aws::OpenSearchMemory::Types::MemoryStrategyConfiguration
- Defined in:
- gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb
Overview
Settings for a memory strategy. The defaults described here apply when
you create a strategy. In UpdateSpace, a member you omit for a kept
strategy keeps its current value.
Constant Summary collapse
- SENSITIVE =
[:extraction_prompt]
Instance Attribute Summary collapse
-
#consolidation_enabled ⇒ Boolean
Specifies whether the strategy consolidates memories.
-
#extract_every_n_messages ⇒ Integer
Extract once this many messages have accumulated, from 1 to 1000.
-
#extract_every_n_tokens ⇒ Integer
Extract once this many tokens of conversation have accumulated, from 1 to 80,000, however few messages that takes.
-
#extraction_prompt ⇒ String
Instructions that define what a
CUSTOMstrategy extracts, up to 30,720 characters. -
#extraction_seed_recent_n ⇒ Integer
How many of the strategy's most recent stored memories to include in the extraction prompt, from 0 to 20.
-
#extraction_seed_top_k ⇒ Integer
How many of the strategy's stored memories that are most relevant to the conversation to include in the extraction prompt, from 0 to 20, to improve extraction and reduce duplicates.
-
#idle_timeout_seconds ⇒ Integer
Extract what has accumulated once the conversation has been idle for this many seconds, from 1 to 86,400.
Instance Attribute Details
#consolidation_enabled ⇒ Boolean
Specifies whether the strategy consolidates memories. With consolidation, each new memory is compared with similar stored memories, and the service adds it, updates a stored memory, or skips it, so duplicate or contradicting facts don't accumulate. Without it, every extracted memory is stored as a new memory, which costs less and keeps a full history.
When omitted, the default depends on the strategy's type: on for
SEMANTIC and SUMMARY, off for CUSTOM.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |
#extract_every_n_messages ⇒ Integer
Extract once this many messages have accumulated, from 1 to 1000. Lower values extract more often, in smaller batches. The default is 12.
Messages accumulate until the first of extractEveryNMessages,
extractEveryNTokens, and idleTimeoutSeconds is reached. The
service then extracts them together in one pass.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |
#extract_every_n_tokens ⇒ Integer
Extract once this many tokens of conversation have accumulated, from
1 to 80,000, however few messages that takes. Use it to bound how
much text one extraction call carries when message sizes vary
widely. Omit it to bound a batch only by extractEveryNMessages,
idleTimeoutSeconds, and the service's maximum batch size.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |
#extraction_prompt ⇒ String
Instructions that define what a CUSTOM strategy extracts, up to
30,720 characters. Required for a CUSTOM strategy: CreateSpace
and UpdateSpace fail with ValidationException if a CUSTOM
strategy has none.
Only CUSTOM strategies use it. SEMANTIC and SUMMARY strategies
always extract with the service's built-in instructions: the
service accepts and stores a prompt on them, and GetSpace returns
it, but extraction doesn't use it.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |
#extraction_seed_recent_n ⇒ Integer
How many of the strategy's most recent stored memories to include
in the extraction prompt, from 0 to 20. If you omit this or set it
to 0, the service uses its default: no seeding for most strategy
types, and the 10 most recent memories for a SUMMARY strategy when
neither seed setting is given. When this and extractionSeedTopK
are both set, the two sets of memories are combined without
duplicates.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |
#extraction_seed_top_k ⇒ Integer
How many of the strategy's stored memories that are most relevant
to the conversation to include in the extraction prompt, from 0 to
20, to improve extraction and reduce duplicates. If you omit this or
set it to 0, the service uses its default (see
extractionSeedRecentN). When this and extractionSeedRecentN are
both set, the two sets of memories are combined without duplicates.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |
#idle_timeout_seconds ⇒ Integer
Extract what has accumulated once the conversation has been idle for this many seconds, from 1 to 86,400. The default is 60. This is what extracts the end of a conversation that stops. Raise it when the pauses in your conversations are longer than that, so that one exchange isn't split across several extraction passes.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'gems/aws-sdk-opensearchmemory/lib/aws-sdk-opensearchmemory/types.rb', line 1529 class MemoryStrategyConfiguration < Struct.new( :extraction_prompt, :extract_every_n_messages, :extract_every_n_tokens, :idle_timeout_seconds, :extraction_seed_top_k, :extraction_seed_recent_n, :consolidation_enabled) SENSITIVE = [:extraction_prompt] include Aws::Structure end |