Skip to content

skills are not working in PromptTemplate (python-3.9) #182

Closed

Description

@joowon-dm-snu

Describe the bug
After learning from the last issue that compatibility with 3.9 was not robust,
I rerun the memory skill part and realized that it was not working properly.

This error is silent because PromptTemplateEngine is using invoke_with_custom_iunput_async function that contains try-exception code for rendering blocks.

originally it should show this error

DelegateHandlers.get_handler(self._delegate_type)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/joowonkim/Repo/semantic-kernel-jw/semantic-kernel/python/semantic_kernel/orchestration/delegate_handlers.py", line 155, in get_handler
    value.__wrapped__, "_delegate_type"
AttributeError: 'staticmethod' object has no attribute '__wrapped__'

similar with #168 semantic-kernel/python/semantic_kernel/orchestration/delegate_handlers.py needs change.

To Reproduce
runsemantic-kernel/python/tests/memory.py
image

Expected behavior
PromptTemplateEngine render blocks correctly

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Mac M1
  • IDE: VS code
  • Python: 3.9.13

Additional context
Add any other context about the problem here.

Activity

  1. joowon-dm-snu commented on Mar 28, 2023

    @joowon-dm-snu
    ContributorAuthor

    while fixing this issue. i find out staticmethod is not callable in python3.9. need to handle it too.

    image

  2. alexchaomander commented on Mar 28, 2023

    @alexchaomander
    Contributor

    Thank you for finding these issues across the different Python versions!

  3. jjhenkel commented on Mar 28, 2023

    @jjhenkel

    Agreed! We may want to decide sooner rather than later on a minimum supported version (which we should discuss) but, regardless, knowing a bit more about possible cross-version issues is a huge help so thank you Joowon (@joowon-dm-snu) !

  4. alexchaomander commented on Mar 29, 2023

    @alexchaomander
    Contributor

    Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests for the Python Semantic Kernel

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions