.Net: Samples showing how to manage Chat History#8954
Merged
markwallace-microsoft merged 27 commits intomicrosoft:mainfrom Nov 4, 2024
Merged
Conversation
5c23134 to
1c65a24
Compare
1c65a24 to
1518b18
Compare
867fa36 to
2c9c306
Compare
0c6c498 to
c39dcfd
Compare
rogerbarreto
approved these changes
Oct 24, 2024
f9605f8 to
84ba044
Compare
e027d02 to
43fe164
Compare
rogerbarreto
approved these changes
Nov 1, 2024
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
crickman
reviewed
Nov 1, 2024
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatHistoryExtensions.cs
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatHistoryExtensions.cs
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/samples/Concepts/ChatCompletion/ChatHistoryReducers/ChatCompletionServiceExtensions.cs
Outdated
Show resolved
Hide resolved
Contributor
|
Are the PR's included in the release notes? If so, perhaps some additional information in the description would be helpful for anyone consuming the release notes? https://github.com/microsoft/semantic-kernel/releases/tag/dotnet-1.26.0 |
crickman
approved these changes
Nov 1, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
Large Language Models (LLMs) operate with a defined limit on the number of tokens they can process at once, referred to as the context window. Exceeding this limit can have significant cost and performance implications. Therefore, it is essential to manage the size of the input sent to the LLM, particularly when using chat completion models. This involves effectively managing chat history and implementing strategies to truncate it when it becomes too large.
Related to #8518
Description
Samples demonstrating how to manage chat history, the following strategies are implemented:
Contribution Checklist