-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating SK to dotnet-0.24.230918.1-preview (#369)
### Motivation and Context <!-- Thank you for your contribution to the chat-copilot repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This pull request updates the SK package and includes several updates and improvements to the project: - Tokenizer change - Error handling updates - Chat optimizations ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - The `SharpToken` package has been added, and `SemanticKernel` packages have been updated to their latest preview versions [dotnet-0.24.230918.1-preview](https://github.com/microsoft/semantic-kernel/releases/tag/dotnet-0.24.230918.1-preview). - The ChatSkill has been updated to improve performance and bypass audience extraction for the default user. - Update `TokenUtilities.TokenCount` to use custom SharpToken token counter implementation with cl100k_base encoding for calculating the number of tokens in a string, improving the accuracy and consistency of token counting in the project. Remove unused code for determining token usage. Improve error handling by logging and throwing the exception. - Refactor `ChatController` and `ChatSkill` to use `SafeInvokeAsync` method for invoking asynchronous callback functions and tagging any exception that occurs with function name. Also, update telemetry tracking accordingly. - Update `BotResponsePrompt.cs` constructor parameter name from `systemResponse` to `systemInstructions` - Simplified AlertMessage in client ![image](https://github.com/microsoft/chat-copilot/assets/125500434/8a838817-eecb-4af6-b532-db0146a54c18) ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations ~- [ ] All unit tests pass, and I have added new tests where possible~ - [x] I didn't break anyone 😄
- Loading branch information
1 parent
0cd34ea
commit c9e585d
Showing
7 changed files
with
77 additions
and
73 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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