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

Python: Merge Kernel, KernelBase, KernelExtensions

Open awharrison-28 opened this issue 2 years ago • 0 comments

Motivation and Context

The separation of Kernel, KernelBase, and KernelExtensions is several layers of unnecessary abstraction. This PR does not change any API or kernel behavior - it just reduces the number of files and namespaces to accomplish the same functionality.

Description

  • Removed the semantic_kernel/kernel_extensions namespace. Methods that existed in this namespace now exist in kernel.py.
  • Removed KernelBase - this abstract class implies that there are multiple ways to instantiate SK. For Python, we expect only a single type of Kernel to instantiated for all instances.
  • Updated tests and imports to accommodate the above changes.

Contribution Checklist

  • [ ] The code builds clean without any errors or warnings
  • [ ] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
  • [ ] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
  • [ ] All unit tests pass, and I have added new tests where possible
  • [ ] I didn't break anyone :smile:

awharrison-28 avatar May 15 '23 23:05 awharrison-28