Add session-memory module: Spring AI 2.1 Session API (event log, turn-aware windows, compaction with summarizer, SessionAdvisors, JDBC on PostgreSQL 16) with 14 transcripts and the 2.0 ChatMemory deprecation warnings from javac. Spring Boot 4.1.1, Spring AI 2.1.0, Java 25.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6jDW7zqoKDMTRrCyq
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# A session is an append-only log; the active view is a projection of it
|
||||
|
||||
After 5 turns, the log holds 10 events and the model would see 10 messages:
|
||||
1 MESSAGE U:u1
|
||||
2 MESSAGE A:a1
|
||||
3 MESSAGE U:u2
|
||||
4 MESSAGE A:a2
|
||||
5 MESSAGE U:u3
|
||||
6 MESSAGE A:a3
|
||||
7 MESSAGE U:u4
|
||||
8 MESSAGE A:a4
|
||||
9 MESSAGE U:u5
|
||||
10 MESSAGE A:a5
|
||||
|
||||
compact(trigger: more than 3 turns, strategy: keep last 2 turns):
|
||||
unchanged=false covered=6 preserved=4 pinned=0
|
||||
|
||||
The log now holds 11 events (nothing was removed, one COMPACTION boundary was appended):
|
||||
1 MESSAGE U:u1
|
||||
2 MESSAGE A:a1
|
||||
3 MESSAGE U:u2
|
||||
4 MESSAGE A:a2
|
||||
5 MESSAGE U:u3
|
||||
6 MESSAGE A:a3
|
||||
7 MESSAGE U:u4
|
||||
8 MESSAGE A:a4
|
||||
9 MESSAGE U:u5
|
||||
10 MESSAGE A:a5
|
||||
11 COMPACTION payload=[coveredEventCount, pinnedEventIds, preservedEventIds, strategy, summaryEventIds, tokensEstimatedSaved]
|
||||
|
||||
The active view (what the next prompt starts from): U:u4 | A:a4 | U:u5 | A:a5
|
||||
Reference in New Issue
Block a user