Systemy_dialogowe/system_mockup/taktyka_dialogu.py
2022-05-25 12:52:02 +02:00

22 lines
485 B
Python

from enum import Enum
class Questions(Enum):
TIME = "time"
REPO = "repo"
NONE = "none"
def taktyka_dialogu(state, frame):
return questions(frame)
# TODO inna taktyka
def questions(frame):
for slot in frame['slots']:
if slot[0] == "time_when" and slot[1] == None:
return Questions.TIME
if slot[0] == "repo" and (slot[1] == None or slot[1] == ""):
return Questions.REPO
return Questions.NONE