-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net Kernel and ISKFunction Streaming Option #1 (Phase 1) #3496
Merged
RogerBarreto
merged 61 commits into
microsoft:main
from
RogerBarreto:feaures/kernel-streaming-option1
Nov 24, 2023
Merged
.Net Kernel and ISKFunction Streaming Option #1 (Phase 1) #3496
RogerBarreto
merged 61 commits into
microsoft:main
from
RogerBarreto:feaures/kernel-streaming-option1
Nov 24, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nto adrs/kernel-streaming
…nto adrs/kernel-streaming
RogerBarreto
added
docs and tests
Improvements or additions to documentation
enhancement
PR: in progress
Under development and/or addressing feedback
.NET
Issue or Pull requests regarding .NET code
kernel
Issues or pull requests impacting the core kernel
PR: breaking change
Pull requests that introduce breaking changes
labels
Nov 14, 2023
…/RogerBarreto/semantic-kernel into feaures/kernel-streaming-option1
RogerBarreto
added
PR: ready for review
All feedback addressed, ready for reviews
and removed
PR: in progress
Under development and/or addressing feedback
labels
Nov 23, 2023
RogerBarreto
removed
the
PR: breaking change
Pull requests that introduce breaking changes
label
Nov 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the plan to add unit and integration tests for this?
dotnet/src/SemanticKernel.Abstractions/AI/ChatCompletion/IChatCompletion.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/ChatCompletion/IChatCompletion.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/ChatCompletion/ChatCompletionExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/TextCompletion/ITextCompletion.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/TextCompletion/ITextCompletion.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Functions/SKFunctionFromPrompt.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Functions/SKFunctionFromPrompt.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Functions/StreamingMethodContent.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Functions/SKFunctionFromMethod.cs
Outdated
Show resolved
Hide resolved
SergeyMenshykh
approved these changes
Nov 24, 2023
RogerBarreto
added
the
PR: ready to merge
PR has been approved by all reviewers, and is ready to merge.
label
Nov 24, 2023
markwallace-microsoft
approved these changes
Nov 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
docs and tests
Improvements or additions to documentation
kernel
Issues or pull requests impacting the core kernel
.NET
Issue or Pull requests regarding .NET code
PR: ready for review
All feedback addressed, ready for reviews
PR: ready to merge
PR has been approved by all reviewers, and is ready to merge.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context and Problem Statement
Resolves #1649
Resolves #1298
It is quite common in co-pilot implementations to have a streamlined output of messages from the LLM (large language models) and currently that is not possible while using ISKFunctions.InvokeAsync or Kernel.RunAsync methods, which enforces users to work around the Kernel and Functions to use
ITextCompletion
andIChatCompletion
services directly as the only interfaces that currently support streaming.Currently streaming is a capability that not all providers do support and this as part of our design we try to ensure the services will have the proper abstractions to support streaming not only of text but be open to other types of data like images, audio, video, etc.
Needs to be clear for the sk developer when he is attempting to get streaming data.
Decision Drivers
The sk developer should be able to get streaming data from the Kernel and Functions using Kernel.RunAsync or ISKFunctions.InvokeAsync methods
The sk developer should be able to get the data in a generic way, so the Kernel and Functions can be able to stream data of any type, not limited to text.
The sk developer when using streaming from a model that does not support streaming should still be able to use it with only one streaming update representing the whole data.
User Experience Goal
Out of Scope
Contribution Checklist