Llm事件摘要生成器(Summarizer)
class LlmEventSummarizer(val model: Model, val promptTemplate: String = DEFAULT_PROMPT_TEMPLATE) : EventSummarizer
An LLM-based event summarizer for context compaction.
This class is responsible for summarizing a provided list of events into a single compacted event. It is designed to be used as part of a context-compaction process such as sliding-window or tail-retention compaction.
When summarizeEvents is called with a list of events, this class formats the events, generates a summary using the model, and returns a new Event containing the summary within a com.google.adk.kt.events.EventCompaction on its Event.actions.
构造函数(Constructors)
Link copied to clipboard
使用默认的提示模板创建一个摘要生成器。Java调用者需要这个功能,因为…… `promptTemplate`它的默认值对他们来说是不可见的,其值也是私有的(即只有拥有该值的用户才能知道该值)。