Class LlmEventSummarizer
java.lang.Object
com.google.adk.summarizer.LlmEventSummarizer
- All Implemented Interfaces:
BaseEventSummarizer
An LLM-based event summarizer for sliding window compaction.
-
Constructor Summary
ConstructorsConstructorDescriptionLlmEventSummarizer(BaseLlm baseLlm) LlmEventSummarizer(BaseLlm baseLlm, String promptTemplate) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<Event> summarizeEvents(List<Event> events) Compact a list of events into a single event.
-
Constructor Details
-
LlmEventSummarizer
-
LlmEventSummarizer
-
-
Method Details
-
summarizeEvents
Description copied from interface:BaseEventSummarizerCompact a list of events into a single event.If compaction failed, return
Maybe.empty(). Otherwise, compact into a content and return it.This method will summarize the events and return a new summary event indicating the range of events it summarized.
- Specified by:
summarizeEventsin interfaceBaseEventSummarizer- Parameters:
events- Events to compact.- Returns:
- The new compacted event, or
Maybe.empty()if no compaction happened.
-