I am trying to get the following sample bot working.
I can run it and connect to it using Bot Framework Emulator successfully.
The following conversation works:
Book flight
- What is your departure city?
miami - Where would you like to travel to?
dallas - What is your departure date?
tomorrow - Does this sound righ to you? I have you traveling to: dallas from: miami on: 2020-03-13
yes - I have you booked to dallas from miami on 2020-03-13.
The problem is when I try to book a flight AND provide a city at the same time
"book flight from miami" - What is your departure city?
My understanding is the bot should recognize the entity miami as a departure city and then ask for the destination city.
I believe the RootDialog.cs file (I am using straight from sample) uses SetProperty() in the Book_flight intent to accomplish this.
I thought the SetProperty() action would store the entity
Value = "@fromCity.location"
in the property
Property = "conversation.flightBooking.destinationCity"
Subsequently, the TextInput would use the prompt
Prompt = new ActivityTemplate("@{PromptForMissingInformation()}")
which reads in the RootDialog.lg file
# PromptForMissingInformation
- IF: @{conversation.flightBooking.departureCity == null}
- @{PromptForDepartureCity()}
- ELSEIF: @{conversation.flightBooking.destinationCity == null}
- @{PromptForDestinationCity()}
- ELSEIF: @{conversation.flightBooking.departureDate == null}
- @{PromptForTravelDate()}
- ELSE:
- @{ConfirmBooking()}
This should NOT prompt for departure city if it was already provided/stored.
I also looked at the results returned from LUIS using LUIS trace in Bot Framework Emulator. LUIS appears to correctly identify the intent Book_flight AND the entity fromCity as miami
{
"recognizerResult": {
"alteredText": null,
"entities": {
"$instance": {
"fromCity": [
{
"endIndex": 22,
"startIndex": 17,
"text": "miami",
"type": "builtin.geographyV2.city"
}
]
},
"fromCity": [
{
"location": "miami",
"type": "city"
}
]
},
"intents": {
"Book_flight": {
"score": 0.941154063
}
},
"text": "book flight from miami"
}
}
Why is SetProperty() not saving the fromCity entity information? The 3 SetProperty() actions can be removed and the bot still works the same. Does this sample bot work for other people? What am I missing?
Any help would be appreciated.