microsoft / typechat.net

MIT License
184 stars 26 forks source link

RuntimeBinderException in PluginProgramTranslator - object[] to JsonNode conversion #162

Closed lemillermicrosoft closed 12 months ago

lemillermicrosoft commented 1 year ago

I've successfully run my app with a single kernel plugin. However sometimes|eventually it throws this error. Will try and get more info/context.

Unhandled exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'object[]' to 'System.Text.Json.Nodes.JsonNode'
   at CallSite.Target(Closure, CallSite, Object)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at Microsoft.TypeChat.ProgramInterpreter.EvalAsync(ObjectExpr expr)
   at Microsoft.TypeChat.ProgramInterpreter.EvalAsync(Expression expr)
   at Microsoft.TypeChat.ProgramInterpreter.EvalAsync(Expression[] expressions)
   at Microsoft.TypeChat.ProgramInterpreter.EvalAsync(FunctionCall call)
   at Microsoft.TypeChat.ProgramInterpreter.RunAsync(Program program, Func`3 callHandlerAsync)
umeshma commented 1 year ago

Good catch. Fixed.