Class SessionTurnAdvisor.Builder
java.lang.Object
org.springframework.ai.session.advisor.SessionTurnAdvisor.Builder
- Enclosing class:
- SessionTurnAdvisor
-
Method Summary
Modifier and TypeMethodDescriptionasyncCompaction(boolean asyncCompaction) Whether compaction runs after the call returns, on thescheduler, so a summarizing strategy adds no model call to the reply's latency;falseby default.build()compactionStrategy(CompactionStrategy strategy) How to compact; set together withcompactionTrigger.compactionTrigger(CompactionTrigger trigger) When to compact once a turn has ended; set together withcompactionStrategy.order(int order) The order;SessionTurnAdvisor.DEFAULT_ORDERby default.scheduler(reactor.core.scheduler.Scheduler scheduler) The scheduler the session writes of a streamed call run on.
-
Method Details
-
order
The order;SessionTurnAdvisor.DEFAULT_ORDERby default. Keep it before the tool-calling advisor, so the loop runs inside the turn. -
scheduler
The scheduler the session writes of a streamed call run on. -
compactionTrigger
When to compact once a turn has ended; set together withcompactionStrategy. -
compactionStrategy
How to compact; set together withcompactionTrigger. -
asyncCompaction
Whether compaction runs after the call returns, on thescheduler, so a summarizing strategy adds no model call to the reply's latency;falseby default. Acall()runs it with the caller's thread-local context, the security context for example, captured with Micrometer's context propagation; astream()ends on the scheduler already. One compaction per session runs at a time from this advisor; a new turn that writes to the session meanwhile stays in the view, the compaction lands rebased onto its events with the same summary. Only another compaction's boundary, or turns that keep overtaking it, make it stand down until the next turn. -
build
-