diff --git a/skills/src/csharp/experimental/restaurantbooking/Dialogs/SkillDialogBase.cs b/skills/src/csharp/experimental/restaurantbooking/Dialogs/SkillDialogBase.cs index 9f29e1f189..98efb82fde 100644 --- a/skills/src/csharp/experimental/restaurantbooking/Dialogs/SkillDialogBase.cs +++ b/skills/src/csharp/experimental/restaurantbooking/Dialogs/SkillDialogBase.cs @@ -195,9 +195,9 @@ protected async Task DigestLuisResult(DialogContext dc, ReservationLuis luisResu } } - if (entities.geographyV2_City != null) + if (entities.geographyV2 != null) { - state.Booking.Location = entities.geographyV2_City.First(); + state.Booking.Location = entities.geographyV2.First().Location; } // Establishing attendee count can be problematic as the number entity can be picked up for poorly qualified diff --git a/skills/src/csharp/experimental/restaurantbooking/Services/ReservationLuis.cs b/skills/src/csharp/experimental/restaurantbooking/Services/ReservationLuis.cs index d21931328e..ea73e90409 100644 --- a/skills/src/csharp/experimental/restaurantbooking/Services/ReservationLuis.cs +++ b/skills/src/csharp/experimental/restaurantbooking/Services/ReservationLuis.cs @@ -28,7 +28,7 @@ public class _Entities // Built-in entities public DateTimeSpec[] datetime; - public string[] geographyV2_City; + public GeographyV2[] geographyV2; public double[] number; // Lists @@ -54,7 +54,7 @@ public class _Instance { public InstanceData[] people; public InstanceData[] datetime; - public InstanceData[] geographyV2_City; + public InstanceData[] geographyV2; public InstanceData[] number; public InstanceData[] cuisine; public InstanceData[] attendees; diff --git a/skills/src/csharp/experimental/weatherskill/Dialogs/SkillDialogBase.cs b/skills/src/csharp/experimental/weatherskill/Dialogs/SkillDialogBase.cs index 04e6a8aa08..a9e4fecf8c 100644 --- a/skills/src/csharp/experimental/weatherskill/Dialogs/SkillDialogBase.cs +++ b/skills/src/csharp/experimental/weatherskill/Dialogs/SkillDialogBase.cs @@ -183,9 +183,9 @@ protected async Task DigestLuisResult(DialogContext dc) { var entities = state.LuisResult.Entities; - if (entities.geographyV2_city != null) + if (entities.geographyV2 != null) { - state.Geography = entities.geographyV2_city[0]; + state.Geography = entities.geographyV2[0].Location; } } } diff --git a/skills/src/csharp/experimental/weatherskill/Services/WeatherSkillLuis.cs b/skills/src/csharp/experimental/weatherskill/Services/WeatherSkillLuis.cs index e0e71c2e26..9c7417d30b 100644 --- a/skills/src/csharp/experimental/weatherskill/Services/WeatherSkillLuis.cs +++ b/skills/src/csharp/experimental/weatherskill/Services/WeatherSkillLuis.cs @@ -23,12 +23,12 @@ public class _Entities { // Built-in entities - public string[] geographyV2_city; + public GeographyV2[] geographyV2; // Instance public class _Instance { - public InstanceData[] geographyV2_city; + public InstanceData[] geographyV2; } [JsonProperty("$instance")] public _Instance _instance; diff --git a/skills/src/csharp/pointofinterestskill/pointofinterestskill/Dialogs/MainDialog.cs b/skills/src/csharp/pointofinterestskill/pointofinterestskill/Dialogs/MainDialog.cs index 7aef75263b..d65739fd89 100644 --- a/skills/src/csharp/pointofinterestskill/pointofinterestskill/Dialogs/MainDialog.cs +++ b/skills/src/csharp/pointofinterestskill/pointofinterestskill/Dialogs/MainDialog.cs @@ -376,14 +376,9 @@ private async Task DigestLuisResult(DialogContext dc, PointOfInterestLuis luisRe // ADDRESS overwrites geographyV2 var sb = new StringBuilder(); - if (entities.geographyV2_poi != null) + if (entities.geographyV2 != null) { - sb.AppendJoin(" ", entities.geographyV2_poi); - } - - if (entities.geographyV2_city != null) - { - sb.AppendJoin(" ", entities.geographyV2_city); + sb.AppendJoin(" ", entities.geographyV2.Select(geography => geography.Location)); } if (sb.Length > 0) diff --git a/skills/src/csharp/pointofinterestskill/pointofinterestskill/Services/PointOfInterestLuis.cs b/skills/src/csharp/pointofinterestskill/pointofinterestskill/Services/PointOfInterestLuis.cs index 4e5fd74b15..ec7918a52a 100644 --- a/skills/src/csharp/pointofinterestskill/pointofinterestskill/Services/PointOfInterestLuis.cs +++ b/skills/src/csharp/pointofinterestskill/pointofinterestskill/Services/PointOfInterestLuis.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using Microsoft.Bot.Builder; using Microsoft.Bot.Builder.AI.Luis; + namespace Luis { public partial class PointOfInterestLuis: IRecognizerConvert @@ -31,9 +32,7 @@ public class _Entities // Built-in entities public double[] number; - // Workaround. Remove them when combined to geographV2[] in 4.5 - public string[] geographyV2_poi; - public string[] geographyV2_city; + public GeographyV2[] geographyV2; // Lists public string[][] ROUTE_TYPE; @@ -44,8 +43,7 @@ public class _Instance public InstanceData[] KEYWORD; public InstanceData[] ADDRESS; public InstanceData[] number; - public InstanceData[] geographyV2_poi; - public InstanceData[] geographyV2_city; + public InstanceData[] geographyV2; public InstanceData[] ROUTE_TYPE; } [JsonProperty("$instance")]