Poprawki
This commit is contained in:
parent
d1108d9b8a
commit
a759108c9e
@ -135,8 +135,10 @@ class DialogStateMonitor:
|
||||
continue
|
||||
stage_name = self.get_current_active_stage()['name']
|
||||
is_collect_food = (slot.name == 'pizza' and stage_name == 'collect_food')
|
||||
is_more_food = (slot.name = 'pizza' and stage_name == 'more_food')
|
||||
is_collect_drinks = (slot.name == 'drink' and stage_name == 'collect_drinks')
|
||||
if is_collect_food or is_collect_drinks:
|
||||
is_more_drinks = (slot.name == 'drink' and stage_name == 'more_drinks')
|
||||
if is_collect_food or is_collect_drinks or is_more_food or stage_name == is_more_drinks:
|
||||
if self.item_exists(slot.name, value) is False:
|
||||
self.state['was_previous_order_invalid'] = True
|
||||
return
|
||||
@ -147,13 +149,13 @@ class DialogStateMonitor:
|
||||
new_order[slot.name].append(value)
|
||||
else:
|
||||
new_order[slot.name] = [value]
|
||||
if slot.name == "drink":
|
||||
elif slot.name == "drink":
|
||||
if new_order.get("drink"):
|
||||
new_order[slot.name].append(value)
|
||||
else:
|
||||
new_order[slot.name] = [value]
|
||||
else:
|
||||
new_order[slot.name] = value
|
||||
|
||||
|
||||
if len(new_order) > 0:
|
||||
self.state['belief_state']['order'].append(new_order)
|
||||
self.complete_stage_if_valid('collect_food')
|
||||
|
Loading…
Reference in New Issue
Block a user