Skip to content

Throwing Invalid Signature For Return Type of GetMyDirectReportsEmailAsync() #1321

@GrahamOlson11

Description

@GrahamOlson11

Describe the bug
Function 'GetMyDirectReportsEmailAsync' has an invalid signature not supported by the kernel. This is happening when sending a chat to the Kernel.

To Reproduce
Steps to reproduce the behavior:

  1. Run the Semantic Kernel
  2. Send chat through Chat Bot
  3. See error: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
    An unhandled exception has occurred while executing the request.
    Microsoft.SemanticKernel.KernelException: Function type not supported: Function 'GetMyDirectReportsEmailAsync' has an invalid signature not supported by the kernel.
    at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass46_0.g__ThrowForInvalidSignature|7()
    at Microsoft.SemanticKernel.SkillDefinition.SKFunction.GetDelegateInfo(Object instance, MethodInfo method)
    at Microsoft.SemanticKernel.SkillDefinition.SKFunction.GetMethodDetails(MethodInfo methodSignature, Object methodContainerInstance, Boolean skAttributesRequired, ILogger log)
    at Microsoft.SemanticKernel.SkillDefinition.SKFunction.FromNativeMethod(MethodInfo methodSignature, Object methodContainerInstance, String skillName, ITrustService trustService, ILogger log)
    at Microsoft.SemanticKernel.Kernel.ImportSkill(Object skillInstance, String skillName, ITrustService trustService, ILogger log)
    at Microsoft.SemanticKernel.Kernel.ImportSkill(Object skillInstance, String skillName, ITrustService trustService)

Expected behavior
Either the return type of Task<IEnumerable> needs to be accepted as a valid return type for skill functions or the return type of GetMyDirectReportsEmailAsync must be changed to a valid return type.

Screenshots
From Microsoft.SemanticKernel.Skills.MsGraph;
image
From Microsoft.SemanticKernel.SkillDefinition;
image

Desktop (please complete the following information):

  • OS: Windows
  • IDE: Visual Studio
  • NuGet Package Version 0.15.230531.5-preview

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Sprint: Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions