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

Remove kernel builder pattern for Python: sk.kernel_create() -> sk.Kernel()

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

Motivation and Context

This PR makes creating a kernel instance more pythonic. The builder pattern is removed and the kernel is constructed using Kernel(...).

Work originally started with #137

Description

  • Removed kernel_builder.py.
  • Instance creation pattern kernel = sk.create_kernel() -> kernel = sk.Kernel()
  • For notebook 6, there is no need to create a separate kernel for the GitHub files. Changed to use a separate collection.

Contribution Checklist

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

awharrison-28 avatar Apr 14 '23 18:04 awharrison-28

@mkarle I'll merge after your ✅

dluc avatar Apr 15 '23 22:04 dluc