JSON serializer error with BotFramework an LUIS

后端 未结 1 546
旧巷少年郎
旧巷少年郎 2021-01-25 01:09

StackOverflow Community!

I have a chatbot, and integrated LUIS.ai to make it smarter. One of the dialogues is about to Book an appointment with a Supervisor (Teacher) Ev

相关标签:
1条回答
  • 2021-01-25 02:05

    This is known issue (also reported here and here).

    Long story short, since the builtin.datetimeV2.* entities are not yet supported in BotBuilder, the Resolution dictionary of the EntityRecommendation ends up with an entry with a value of type JArray. The problem arises when you pass those entities to a FormDialog. Since the entities are a private field in the dialog and of course, as any other dialog, is being serialized, an exception is being thrown because the JArray class from Newtonsoft is not marked as serializable.

    The request for adding support for datetimeV2 entities is here.

    The workaround I can think of right now is to extract the value of the DateTime entity manually and assign it your Date field of your MeetingsQuery instance you are passing to the FormDialog and also to remove the DateTime entity from the result.Entities collection that you are passing to the FormDialog.

    Update

    This is already fixed in the SDK as you can see in this Pull Request.

    0 讨论(0)
提交回复
热议问题