Skip to content

RollingMemoryUnit

Description: Memory unit that only retrieves the most recent messages that are under a token limit. Does not summarize removed messages.

PropertyPatternTypeDeprecatedDefinitionTitle/Description
+ implementationNoconstNo-Implementation
- encodingNostringNo-Encoding
- token_limitNointegerNo-Token Limit

1. Property implementation

Title: Implementation

Typeconst
RequiredYes

Specific value: "RollingMemoryUnit"

2. Property encoding

Title: Encoding

Typestring
RequiredNo
Default"o200k_base"

Description: tiktoken encoding to use when counting tokens

3. Property token_limit

Title: Token Limit

Typeinteger
RequiredNo
Default32000

Description: The maximum number of message tokens to sent to llm