Real PostgreSQL 16 and Redis Stack 7.4; 24 tests write output/01-24. Covers the 20-message default window with no property, the 36-character conversation_id, tool messages dropped by JdbcChatMemoryRepository, concurrent add() on one conversation, a 1.x table under the 2.0 repository, the Redis repository silently backing off for a custom ChatMemory, and the removal of PromptChatMemoryAdvisor. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ja4jkzrbQ4LQZBNrb5mkZE
17 lines
775 B
Plaintext
17 lines
775 B
Plaintext
# RedisChatMemoryRepository on Redis Stack
|
|
|
|
ChatMemoryRepository bean: RedisChatMemoryRepository
|
|
call 1 reply: Nice to meet you, Priya.
|
|
|
|
Keys under the default prefix "chat-memory:" (3: one JSON document per message, plus a counter):
|
|
chat-memory:6f0a1c9e-2b7d-4c55-9a53-0d1f3e7a2b10:<n>
|
|
chat-memory:6f0a1c9e-2b7d-4c55-9a53-0d1f3e7a2b10:<n>
|
|
chat-memory:counter:6f0a1c9e-2b7d-4c55-9a53-0d1f3e7a2b10
|
|
|
|
Fields of one document: [content, conversation_id, metadata, timestamp, type]
|
|
TTL on each key (spring.ai.chat.memory.repository.redis.time-to-live=24h): between 86390 and 86400 s -> true
|
|
|
|
Same conversation, second call "What is my name?":
|
|
reply: Your name is Priya.
|
|
stored: U:My name is Priya | A:Nice to meet you, Priya. | U:What is my name? | A:Your name is Priya.
|