Skip to content
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

Update Semantic.Kernel to beta 1.0 release - refactor and update SKonsole project, commands, and plugins #26

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

lemillermicrosoft
Copy link
Owner

@lemillermicrosoft lemillermicrosoft commented Oct 9, 2023

Summary

This pull request includes a comprehensive update to the SKonsole project, refactoring and updating commands, plugins, and dependencies. The changes aim to enhance code readability, maintainability, and improve logging output.

Changes

  • Changed launch arguments in .vscode/launch.json to include 'stepwise', 'optionset', and 'bing++'
  • Changed console setting in .vscode/launch.json from 'internalConsole' to 'integratedTerminal'
  • Added a new 'format' task in .vscode/tasks.json
  • Updated package versions in Directory.Packages.props for Microsoft.SemanticKernel and related packages
  • Replaced kernel.ImportSkill with kernel.ImportFunctions in CommitCommand.cs and PRCommand.cs
  • Updated kernelResponse.Result to kernelResponse.GetValue() in CommitCommand.cs and PRCommand.cs
  • Update PRCommand to use GetValue() instead of Result for kernelResponse
  • Refactor PlannerCommand to use new naming conventions and structure for SemanticKernel library
  • Update PromptChatCommand to use new AIRequestSettings and PromptTemplateConfig structure
  • Refactor StepwisePlannerCommand to use new naming conventions and structure for SemanticKernel library
  • Rename 'WebSearchEngineSkill' to 'WebSearchEnginePlugin' and update its usage in the code
  • Rename 'TimeSkill' to 'TimePlugin' and update its usage in the code
  • Rename 'ConversationSummarySkill' to 'ConversationSummaryPlugin' and update its usage in the code
  • Rename 'FileIOSkill' to 'SuperFileIOPlugin' and update its usage in the code
  • Update the 'RespondTo' function to return 'SKContext?' instead of 'SKContext'
  • Refactor the 'RespondTo' function to extract metadata and result string into a new SKContext
  • Update the 'RunChat' function to handle the new 'RespondTo' function return type and display additional information when 'Result not found'
  • Refactor the 'KernelProvider' to use a switch expression for configuring the LLM provider
  • Refactor KernelProvider.cs to include new configuration options for OpenAI and Azure chat completion services
  • Refactor Program.cs to use a more concise syntax for adding commands to the root command
  • Update SKonsole.csproj to replace Microsoft.SemanticKernel.Skills.Web and Microsoft.SemanticKernel.Planning.StepwisePlanner with Microsoft.SemanticKernel.Planners.Core and Microsoft.SemanticKernel.Plugins.Web
  • Update EmailSkill.cs and GitSkill.cs to use the new Microsoft.SemanticKernel namespace instead of Microsoft.SemanticKernel.SkillDefinition
  • Add a new SuperFileIOPlugin.cs for file operations, including reading, writing, listing, and searching files and directories
  • Update WriterSkill.cs to use the new Microsoft.SemanticKernel.AI namespace
  • Changed 'skillName' to 'pluginName' in WriterSkill.cs
  • Updated AIRequestSettings in WriterSkill.cs to use a dictionary for extension data
  • Added SpectreConsoleExtensions.cs to handle secret input prompts
  • Replaced ArgumentNullException with nameof(obj) in SpectreConsoleExtensions.cs
  • Created a new SpectreConsoleLoggerProvider in SpectreConsoleLoggerProvider.cs
  • Implemented SpectreConsoleLoggingExtensions for adding SpectreConsole to the logging builder
  • Modified Logging.cs to use the new SpectreConsoleLoggerProvider
  • Updated CondenseSkill.cs to use the new semantic function import method
  • Changed function invocation in CondenseSkill.cs to use the new Runner.RunAsync method
  • Replace func.InvokeAsync with context.Runner.RunAsync for better readability
  • Rename ImportSemanticSkillFromDirectory to ImportSemanticFunctionsFromDirectory to better reflect its purpose
  • Update method signatures for ITextCompletion.GetCompletionsAsync and ITextCompletion.GetStreamingCompletionsAsync to use AIRequestSettings instead of CompleteRequestSettings
  • Modify the calculation of nextMatch in SplitFileInfo method for better readability
  • Replace context.Skills.GetFunction with context.Functions.GetFunction to better align with the updated method names

Powered by Microsoft Semantic Kernel

This commit includes updating the Microsoft.SemanticKernel package to
version 1.0.0-beta1, refactoring the code to use the new package
structure, and improving various functions and classes. Key changes
include:

- Updating function imports to use new namespaces and classes
- Refactoring PromptChatCommand to use AIRequestSettings and ExtensionData
- Modifying RespondTo method to return SKContext instead of Task<SKContext>
- Updating StepwisePlannerCommand to import functions instead of skills
- Adding a new SuperFileIOPlugin class with various file operations
- Updating AI request settings in WriterSkill.cs
- Refactoring functions in CondenseSkill.cs and PullRequestSkill.cs
- Updating method calls and parameter types in PullRequestSkill
- Minor code improvements and formatting
- Refactored tasks.json to include a new "format" task
- Simplified KernelProvider using switch expression
- Updated Program.cs to use object initializer for RootCommand
- Minor changes in CommitParser.cs for better readability
- Update launch arguments in .vscode/launch.json
- Replace internalConsole with integratedTerminal
- Add SpectreConsole logging and extensions
- Improve ArgumentNullException handling in SpectreConsoleExtensions
- Add SpectreConsoleLoggerProvider for better logging output
@lemillermicrosoft
Copy link
Owner Author

/sk generate-pr-description

@github-actions github-actions bot changed the title Sk beta Sk beta Refactor and update SKonsole project, commands, and plugins Oct 9, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Generate PR Description: succeeded ✅
https://github.com/lemillermicrosoft/skonsole/actions/runs/6460465587

@lemillermicrosoft lemillermicrosoft changed the title Sk beta Refactor and update SKonsole project, commands, and plugins Update Semantic.Kernel to beta 1.0 release - refactor and update SKonsole project, commands, and plugins Oct 9, 2023
@lemillermicrosoft lemillermicrosoft marked this pull request as ready for review October 9, 2023 18:41
@lemillermicrosoft lemillermicrosoft merged commit 5be840d into main Oct 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant