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

Python: Native Function (Python) - cannot import name 'kernel_function' from 'semantic_kernel.plugin_definition'

Open tarockey opened this issue 2 years ago • 3 comments

Describe the bug 'kernel_function' does not exist within semantic kernel 0.4.6.dev0, but is referenced in example notebooks

To Reproduce Steps to reproduce the behavior:

  1. Go to the example python notebook 08-native-function-inline.ipynb
  2. Attempt to run the 3rd cell, which defines the native function
  3. See error

Expected behavior The import should resolve, and allow the notebook to run and define functions. For now, I have to revert back to sk_function.

Platform

  • OS: Windows 10
  • IDE: VS Code
  • Language: Python
  • Source: pip package 0.4.6.dev0

tarockey avatar Jan 26 '24 01:01 tarockey

We are observing the same within our ISE Dev Crew team. Happy to connect the Triage / SK team with my engineering team for further insight.

agonzalez2014 avatar Jan 26 '24 20:01 agonzalez2014

I think there was an error in setting the package version for that notebook. The sk_function -> kernel_function rename occurred as part of 0.4.7. Can you please try to reference at least 0.4.7? I would recommend upgrading to the latest 0.5.0 to be able to use the latest features/fixes.

moonbox3 avatar Feb 05 '24 22:02 moonbox3

This issue can go ahead and be closed - the notebook has since been updated several times with new versions, etc.

tarockey avatar Mar 05 '24 23:03 tarockey