Skip to content

Commit 609c617

Browse files
adrianadhangfei
authored andcommitted
docs: too many E(inv=2, role=user) plus reformatting
Merge #3538 Main change from: E(inv=2, role=user), E(inv=2, role=model), E(inv=2, role=user), To: E(inv=2, role=user), E(inv=2, role=model) I think the last E(inv=2, role=user) was wrong. Also reformatted. Co-authored-by: Hangfei Lin <hangfei@google.com> COPYBARA_INTEGRATE_REVIEW=#3538 from adrianad:patch-1 627b933 PiperOrigin-RevId: 835346467
1 parent 9d331ab commit 609c617

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/google/adk/apps/compaction.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ async def _run_compaction_for_sliding_window(
7272
beginning.
7373
- A `CompactedEvent` is generated, summarizing events within
7474
`invocation_id` range [1, 2].
75-
- The session now contains: `[E(inv=1, role=user), E(inv=1, role=model),
76-
E(inv=2, role=user), E(inv=2, role=model), E(inv=2, role=user),
77-
CompactedEvent(inv=[1, 2])]`.
75+
- The session now contains: `[
76+
E(inv=1, role=user), E(inv=1, role=model),
77+
E(inv=2, role=user), E(inv=2, role=model),
78+
CompactedEvent(inv=[1, 2])]`.
7879
7980
2. **After `invocation_id` 3 events are added:**
8081
- No compaction happens yet, because only 1 new invocation (`inv=3`)
@@ -91,10 +92,13 @@ async def _run_compaction_for_sliding_window(
9192
- The new compaction range is from `invocation_id` 2 to 4.
9293
- A new `CompactedEvent` is generated, summarizing events within
9394
`invocation_id` range [2, 4].
94-
- The session now contains: `[E(inv=1, role=user), E(inv=1, role=model),
95-
E(inv=2, role=user), E(inv=2, role=model), E(inv=2, role=user),
96-
CompactedEvent(inv=[1, 2]), E(inv=3, role=user), E(inv=3, role=model),
97-
E(inv=4, role=user), E(inv=4, role=model), CompactedEvent(inv=[2, 4])]`.
95+
- The session now contains: `[
96+
E(inv=1, role=user), E(inv=1, role=model),
97+
E(inv=2, role=user), E(inv=2, role=model),
98+
CompactedEvent(inv=[1, 2]),
99+
E(inv=3, role=user), E(inv=3, role=model),
100+
E(inv=4, role=user), E(inv=4, role=model),
101+
CompactedEvent(inv=[2, 4])]`.
98102
99103
100104
Args:

0 commit comments

Comments
 (0)