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
{{ message }}
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
bf luis:generate:cs generates wrong class for "money/currency" prebuilt entity. #1069
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.P1Painful if we don't fix, won't block releasingcustomer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.
bf luis:generate:cs when called by update_cognitive_models.ps1 does not manage correctly the "money/currency" prebuilt entity.
I have an Hotel entity with two subentities HotelTimeFrame and TotalAmount. TotalAmount being modeled as a prebuilt money entity:
@ ml Hotel
- @ ml HotelTimeFrame usesFeature MLTimeFrame
- @ money TotalAmount
With this definition bf luis:generate:cs is generating the MySkillLuis.cs as following, with TotalAmount as string[]:
public class HotelClass
{
public string[] HotelTimeFrame;
public string[] TotalAmount;
[JsonProperty("$instance")]
public _InstanceHotel _instance;
}
public HotelClass[] Hotel;
This way, I get an exception in the Convert method of the generated class:
public void Convert(dynamic result)
{
var app = JsonConvert.DeserializeObject<MySkillLuis>(
JsonConvert.SerializeObject(
result,
new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, Error = OnError }
)
[...]
I manually changed the class definition as follows, with TotalAmount as Money[], and it worked:
public class HotelClass
{
public string[] HotelTimeFrame;
public Money[] TotalAmount;
[JsonProperty("$instance")]
public _InstanceHotel _instance;
}
public HotelClass[] Hotel;
But that's quite never a viable solution, since in many environment the update_cognitive_models.ps1 is executed by the ci/cd pipeline.
Hi Alessandro (@GitDruid), as a workaround we used the composite entity and the result was a similar one as the desired. We added an example so you can use it as a guide.
Alessandro (@GitDruid) thanks for logging this. We're currently evaluating the changes needed to support this, in the case that we take this fix as is we will target our R12 realease date. We will update here if needed.
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.P1Painful if we don't fix, won't block releasingcustomer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.
Activity
Batta32 commentedon Nov 26, 2020
Hi Alessandro (@GitDruid), thanks for reporting this issue. We will be reviewing this scenario in order to check the root cause of the issue.
We will back to you as soon as we have any update 😊.
GitDruid commentedon Nov 27, 2020
Just as additional note, If I switch to this definition in .lu file:
it is working, since
TotalAmountis returned as string from LUIS in that case.tonyanziano commentedon Dec 1, 2020
Martin Battaglino (@Batta32) / Axel Suárez (@axelsrz) any updates on this?
Batta32 commentedon Dec 1, 2020
Hi Tony Anziano (@tonyanziano), this week we will start working on this issue in order to reproduce the problem.
This week we will provide the updates here 😊.
Batta32 commentedon Dec 3, 2020
Hi Alessandro (@GitDruid), sorry for the delay. We successfully reproduced the issue.
We will investigate the reason of this, we will back to you as soon as we have any update 😊.
Issue reproduced

Batta32 commentedon Dec 4, 2020
Hi Alessandro (@GitDruid), as a workaround we used the composite entity and the result was a similar one as the desired. We added an example so you can use it as a guide.
Emilio Munoz (@munozemilio) & Axel Suárez (@axelsrz) - should we transfer this issue to botframework-cli repository? As this appears to be an issue of bf-cli tool.
Last but not least, we reviewed the stack of tests that the CLI team added in the repository to have the same desired result with no success.
We will keep researching another alternatives and we will back here 😊.
This is the documentation we read:
Example of .lu file using composite entity
Class generated using composite entity

tonyanziano commentedon Dec 8, 2020
Will this be addressed in R12?
axelsrz commentedon Dec 10, 2020
Alessandro (@GitDruid) thanks for logging this. We're currently evaluating the changes needed to support this, in the case that we take this fix as is we will target our R12 realease date. We will update here if needed.