Finalne poprawki

This commit is contained in:
s495727 2024-06-13 16:56:47 +02:00
parent 437f5f7d72
commit fefc6bd7bc
2 changed files with 9 additions and 2 deletions

View File

@ -45,7 +45,7 @@ while True:
print(response) print(response)
if system_action.act == "bye_and_thanks" or system_action.act == "bye": if system_action.act == "bye_and_thanks" or system_action.act == "bye":
print(monitor.print_order()) monitor.print_order()
break break
if frame.act == "bye": if frame.act == "bye":

View File

@ -195,4 +195,11 @@ class DialogStateMonitor:
self.state = copy.deepcopy(self.__initial_state) self.state = copy.deepcopy(self.__initial_state)
def print_order(self) -> dict: def print_order(self) -> dict:
return json.dumps(self.state['belief_state']) print("\n=== Oto podsumowanie Twojego zamówienia ===")
for o in self.state['belief_state']['order']:
print(o)
print("Adres dostawy: ")
print(self.state['belief_state']['order'])
print("Numer telefonu: ")
print(self.state['belief_state']['phone'])
print(f"Czy zostało pomyślnie zrealizowane: {self.state['belief_state']['order-complete']}")