semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

New Feature: SystemMessage and History for Plugins

Open KSemenenko opened this issue 1 year ago • 2 comments

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.

KSemenenko avatar Jun 30 '24 10:06 KSemenenko

    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?

KSemenenko avatar Jun 30 '24 12:06 KSemenenko

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.

alliscode avatar Jul 01 '24 17:07 alliscode

Closing for now, feel free to reopen if needed. Thanks.

alliscode avatar Jul 02 '24 15:07 alliscode