2022-04-19 23:22:20 +02:00
|
|
|
from acts import hello_act
|
|
|
|
|
|
|
|
|
2022-04-19 22:53:05 +02:00
|
|
|
dialogue_state = []
|
|
|
|
|
2022-04-19 21:25:38 +02:00
|
|
|
def monitor_stanu_dialogowego(frame):
|
2022-04-19 22:53:05 +02:00
|
|
|
# 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:
|
2022-04-19 22:53:05 +02:00
|
|
|
dialogue_state.clear()
|
|
|
|
|