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
The csharp code under this page (in the Putting it all together section) as well as in the github code orchestrator.cs will cause the application to crash due to an iinvalid cast exception when the intent evaluates to "Multiply"
Here are the details:
System.InvalidCastException
HResult=0x80004002
Message=Cannot cast System.String to System.Double
Source=Microsoft.SemanticKernel.Abstractions
StackTrace:
at Microsoft.SemanticKernel.Orchestration.KernelResult.GetValueT
at SKPrompts.Plugins.OrchestratorPlugin.Orchestrator.d__2.MoveNext() in C:\Siva\Projects\SemanticKernel\SKPrompts\SKPrompts\Plugins\OrchestratorPlugin\OrchestratorPlugin.cs:line 61
at Microsoft.SemanticKernel.NativeFunction.<>c.<b__35_7>d.MoveNext()
at Microsoft.SemanticKernel.NativeFunction.d__18.MoveNext()
at Microsoft.SemanticKernel.Kernel.d__21.MoveNext()
at Program.<
$>d__0.MoveNext() in C:\XXX\Program.cs:line 48
The code that causes this exception is in Orchestrator.cs line#58
return result.GetValue()!.ToString();
This line needs to be changed to
return result.GetValue()!.ToString(); //same as line#48
The text was updated successfully, but these errors were encountered:
Please refer to the following doc page:
https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/plugins/native-functions/calling-nested-functions?tabs=Csharp
The csharp code under this page (in the Putting it all together section) as well as in the github code orchestrator.cs will cause the application to crash due to an iinvalid cast exception when the intent evaluates to "Multiply"
Here are the details:
$>d__0.MoveNext() in C:\XXX\Program.cs:line 48System.InvalidCastException
HResult=0x80004002
Message=Cannot cast System.String to System.Double
Source=Microsoft.SemanticKernel.Abstractions
StackTrace:
at Microsoft.SemanticKernel.Orchestration.KernelResult.GetValueT
at SKPrompts.Plugins.OrchestratorPlugin.Orchestrator.d__2.MoveNext() in C:\Siva\Projects\SemanticKernel\SKPrompts\SKPrompts\Plugins\OrchestratorPlugin\OrchestratorPlugin.cs:line 61
at Microsoft.SemanticKernel.NativeFunction.<>c.<b__35_7>d.MoveNext()
at Microsoft.SemanticKernel.NativeFunction.d__18.MoveNext()
at Microsoft.SemanticKernel.Kernel.d__21.MoveNext()
at Program.<
The code that causes this exception is in Orchestrator.cs line#58
return result.GetValue()!.ToString();
This line needs to be changed to
return result.GetValue()!.ToString(); //same as line#48
The text was updated successfully, but these errors were encountered: