semantic-kernel
semantic-kernel copied to clipboard
New Feature: SystemMessage and History for Plugins
Is there a way to pass properly SystemMessage and history into SK plugin/function?
I like the idea to have it, or maybe use ChatHistory to pass as parameter into function.
public IAsyncEnumerable<StreamingKernelContent> InvokeStreamingAsync(
Kernel kernel,
KernelArguments? arguments = null,
CancellationToken cancellationToken = default) =>
this.InvokeStreamingAsync<StreamingKernelContent>(kernel, arguments, cancellationToken)
and maybe as part of arguments we can add ChatHisory? or so?
Hi @KSemenenko and thanks for creating this issue. We currently do not have a great way to inject ChatHistory into a plugin, but we are hoping to get a solution for this soon. The backlog item tracking this is #6610.
If you create a plugin from a prompt template, you can define system and user messages there.
Closing for now, feel free to reopen if needed. Thanks.