Share via


ConversationSummaryPlugin Class

Semantic plugin that enables conversations summarization.

Initializes a new instance of the ConversationSummaryPlugin.

The template for this plugin is built-in, and will overwrite any template passed in the prompt_template_config.

Constructor

ConversationSummaryPlugin(prompt_template_config: PromptTemplateConfig, return_key: str = 'summary', **kwargs: Any)

Parameters

Name Description
prompt_template_config
Required
<xref:semantic_kernel.core_plugins.PromptTemplateConfig>

The prompt template configuration.

return_key
str

The key to use for the return value.

Default value: summary
**kwargs
Required

Additional keyword arguments, not used only for compatibility.

Methods

summarize_conversation

Given a long conversation transcript, summarize the conversation.

summarize_conversation

Given a long conversation transcript, summarize the conversation.

async summarize_conversation(input: Annotated[str, 'A long conversation transcript.'], kernel: Annotated[Kernel, 'The kernel instance.'], arguments: Annotated[KernelArguments, 'Arguments used by the kernel.']) -> Annotated[KernelArguments, 'KernelArguments with the summarized conversation result in key self.return_key.']

Parameters

Name Description
input
Required
str

A long conversation transcript.

kernel
Required
<xref:semantic_kernel.core_plugins.Kernel>

The kernel for function execution.

arguments
Required
<xref:semantic_kernel.core_plugins.KernelArguments>

Arguments used by the kernel.

Returns

Type Description

KernelArguments with the summarized conversation result in key self.return_key.