You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at line 310 of sk_function.py it appears that there is a typo. It seems we should be invoking self._invoke_native_async(context) instead of self._invoke_semantic_async.
To Reproduce
Steps to reproduce the behavior:
Load a native function.
Execute it
Sample Script
This is the script I am running to reproduce:
nativeFunctions = kernel.import_native_skill_from_directory("skills", "GenerateNumber")
randomFunction = nativeFunctions["Random"]
result = randomFunction.invoke(input="10")
Where the 'GenerateNumber' skill looks like this:
class GenerateNumberSkill:
"""
Description: Generates numbers
"""
@sk_function(description="Generates a random number between 1 - <input>", name="Random")
def random_number(self, input: str) -> str:
"""
Description: Generates a random number between 1 - <input>
"""
try:
return str(random.randint(1, int(input)))
except ValueError as e:
print(f"Invalid upper bound for random value: {input}")
raise e
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to invoke a native function in Python, I am running into this error:
Looking at line 310 of sk_function.py it appears that there is a typo. It seems we should be invoking
self._invoke_native_async(context)
instead ofself._invoke_semantic_async
.To Reproduce
Steps to reproduce the behavior:
Sample Script
This is the script I am running to reproduce:
Where the 'GenerateNumber' skill looks like this:
The text was updated successfully, but these errors were encountered: