15 lines
336 B
Python
15 lines
336 B
Python
dialogue_state = []
|
|
|
|
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):
|
|
if 'hello' in frame:
|
|
dialogue_state.clear()
|
|
|