Skip to content

Commit 664af32

Browse files
authored
feat(adk): deprecate SummarizeMessages (#1009)
1 parent 20891cd commit 664af32

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

adk/middlewares/summarization/summarization.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ type middleware struct {
267267
}
268268

269269
// SummarizeOutput contains the output of a synchronous Summarize call.
270+
//
271+
// Deprecated: See SummarizeMessages.
270272
type SummarizeOutput struct {
271273
// FinalizedMessages is the message list after summarization,
272274
// ready to be used as the new conversation history.
@@ -278,6 +280,11 @@ type SummarizeOutput struct {
278280

279281
// SummarizeMessages performs synchronous summarization of the given messages.
280282
// EmitInternalEvents and Trigger are not supported and will return an error if set.
283+
//
284+
// Deprecated: Use the summarization middleware (created via New) within a dedicated summarization
285+
// agent instead. In practice, summarization often requires preprocessing by other middlewares
286+
// (e.g., message reduction, tool call patching), which is naturally supported by composing
287+
// middlewares in an agent pipeline.
281288
func SummarizeMessages(ctx context.Context, cfg *Config, messages []adk.Message) (*SummarizeOutput, error) {
282289
if cfg.EmitInternalEvents {
283290
return nil, fmt.Errorf("emitInternalEvents is not supported in synchronous summarization")

0 commit comments

Comments
 (0)