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

Python: Add native skill import from directory

Open joowon-dm-snu opened this issue 2 years ago • 4 comments

Motivation and Context

#505

Description

for semantics skills, original code provide import_semantic_skill_from_directory. I hope native functions can be handled like that.

    kernel = sk.Kernel()

    # import skills
    skills_directory = os.path.join(
        os.path.dirname(__file__), "../..", "test_native_skills"
    )
    # path to skills directory
    skill_config_dict = kernel.import_native_skill_from_directory(
        skills_directory, "FileIOSkill"
    )
image

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
  • [x] I didn't break anyone :smile:

joowon-dm-snu avatar Apr 18 '23 13:04 joowon-dm-snu

poetry run pre-commit run -c .conf/.pre-commit-config.yaml -a
poetry run ruff check .

should fix your linting errors

awharrison-28 avatar Apr 20 '23 23:04 awharrison-28

Please fix the double empty lines and whitespace changes that don't contribute to the functionality of the code.

Consider a dedicated PR for whitespace changes that improve code readability.

MovGP0 avatar Apr 21 '23 14:04 MovGP0

Please fix the double empty lines and whitespace changes that don't contribute to the functionality of the code.

Consider a dedicated PR for whitespace changes that improve code readability.

@MovGP0 @awharrison-28 Actually my PR doesn't violate lint errors. that comes from main branch I'll open lint fix PR for main branch image

joowon-dm-snu avatar Apr 21 '23 15:04 joowon-dm-snu

I revert lint commit and open lint PR #578.

joowon-dm-snu avatar Apr 21 '23 15:04 joowon-dm-snu