Systemy_dialogowe/system_mockup/monitor_stanu_dialogowego.py

18 lines
367 B
Python
Raw Normal View History

2022-04-19 23:22:20 +02:00
from acts import hello_act
dialogue_state = []
2022-04-19 21:25:38 +02:00
def monitor_stanu_dialogowego(frame):
# Some frames can reset the dialogue state, like saying hello.
reset_state_if_needed(frame)
list(map(lambda x: dialogue_state.append(x), frame))
return dialogue_state
def reset_state_if_needed(frame):
2022-04-19 23:22:20 +02:00
if hello_act in frame:
dialogue_state.clear()