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

.Net: New Feature: Add Kernel invoke function which takes KernelContent

Open markwallace-microsoft opened this issue 1 year ago • 4 comments

Support the following scenarios:

  1. Kernel.InvokeAsync(ChatHistory) and Kernel.InvokeAsync(List<ChatHistory>)
  2. Kernel.InvokeAsync(KernelContent)
  3. Also streaming variants

markwallace-microsoft avatar Sep 17 '24 21:09 markwallace-microsoft

@markwallace-microsoft on the discord channel I've asked before why I can't use Kernel.InvokeAsync with history and I was told Kernel.InvokeAsync is only for one shot calls.

For me it is not clear when to use Kernel.InvokeAsync and when to use kernel.GetRequiredService<IChatCompletionService>();

Now, when this feature will be implementend the diference is even more vague. Can you provide me some more insights regarding the differences?

Expecho avatar Sep 30 '24 09:09 Expecho

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Dec 30 '24 02:12 github-actions[bot]

@Expecho The current Kernel.InvokeAsync takes a prompt, this prompt can represent a chat history in XML format. We've heard from developers that they want to be able to use ChatHistory directly, but currently the only way to do this is using the IChatCompletionService directly which is causing confusing. The purpose of this task is to simplify things so Kernel.InvokeAsync can be used all of the time.

markwallace-microsoft avatar Jan 07 '25 12:01 markwallace-microsoft

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Apr 26 '25 02:04 github-actions[bot]