Testy skadnikow i ilosci

This commit is contained in:
s495727 2024-06-13 18:10:19 +02:00
parent 0b9a15488c
commit e2e447a601
1 changed files with 4 additions and 7 deletions

View File

@ -156,13 +156,10 @@ class DialogStateMonitor:
new_order[slot.name] = [{"drink": value}]
elif slot.name in ["ingredient", "ingredient/neg"]:
if len(self.state['belief_state']['order']) != 0:
last_order = self.state['belief_state']['order'][-1]
if last_order["name"] == "pizza":
last_order[slot.name].append(value)
elif last_order["name"] == "drink":
last_order[slot.name].append(value)
pizzas_list = new_order.get("pizza")
if pizzas_list:
pizzas_list[-1][slot.name].append(value)
if len(new_order) > 0:
self.state['belief_state']['order'].append(new_order)
self.complete_stage_if_valid('collect_food')