Skip to content

MemoryStrategy

Source code in docs_src/capo_opensearchmemory/types/memory_strategy.py
class MemoryStrategy(TypedDict, closed=True):
    type: "capo_opensearchmemory.types.memory_strategy_type.MemoryStrategyType"
    """<p>The type of memory the strategy extracts.</p>"""
    name: NotRequired[
        "capo_opensearchmemory.types.memory_strategy_name.MemoryStrategyName"
    ]
    """<p>A name for the strategy, unique within the space. Omit it to have the service generate one from the type, for example <code>semantic_1</code>. The name must be 1 to 64 characters: letters, digits, periods, hyphens, and underscores, starting with a letter or digit. A strategy's name can't be changed, and the strategy's memories are stored under it: a strategy added under a new name starts with no memories.</p>"""
    description: NotRequired[
        "capo_opensearchmemory.types.memory_strategy_description.MemoryStrategyDescription"
    ]
    """<p>A description of the strategy.</p>"""
    configuration: NotRequired[
        "capo_opensearchmemory.types.memory_strategy_configuration.MemoryStrategyConfiguration"
    ]
    """<p>Settings for the strategy. When you create a strategy, omit it to use the defaults for the strategy's type.</p> <p>A <code>CUSTOM</code> strategy must set <code>extractionPrompt</code>.</p>"""

configuration instance-attribute

configuration: NotRequired[MemoryStrategyConfiguration]

Settings for the strategy. When you create a strategy, omit it to use the defaults for the strategy's type.

A CUSTOM strategy must set extractionPrompt.

description instance-attribute

description: NotRequired[MemoryStrategyDescription]

A description of the strategy.

name instance-attribute

name: NotRequired[MemoryStrategyName]

A name for the strategy, unique within the space. Omit it to have the service generate one from the type, for example semantic_1. The name must be 1 to 64 characters: letters, digits, periods, hyphens, and underscores, starting with a letter or digit. A strategy's name can't be changed, and the strategy's memories are stored under it: a strategy added under a new name starts with no memories.

type instance-attribute

The type of memory the strategy extracts.