2022-05-25 12:52:02 +02:00
|
|
|
from enum import Enum
|
2022-04-19 23:22:44 +02:00
|
|
|
|
2022-05-25 12:52:02 +02:00
|
|
|
class Questions(Enum):
|
|
|
|
TIME = "time"
|
|
|
|
REPO = "repo"
|
|
|
|
NONE = "none"
|
2022-04-19 23:22:44 +02:00
|
|
|
|
2022-04-20 10:55:53 +02:00
|
|
|
def taktyka_dialogu(state, frame):
|
2022-05-25 12:52:02 +02:00
|
|
|
return questions(frame)
|
|
|
|
# TODO inna taktyka
|
2022-04-19 23:22:44 +02:00
|
|
|
|
|
|
|
|
2022-05-25 12:52:02 +02:00
|
|
|
def questions(frame):
|
|
|
|
for slot in frame['slots']:
|
2022-04-19 23:22:44 +02:00
|
|
|
|
2022-05-25 12:52:02 +02:00
|
|
|
if slot[0] == "time_when" and slot[1] == None:
|
|
|
|
return Questions.TIME
|
2022-04-19 23:22:44 +02:00
|
|
|
|
2022-05-25 12:52:02 +02:00
|
|
|
if slot[0] == "repo" and (slot[1] == None or slot[1] == ""):
|
|
|
|
return Questions.REPO
|
2022-04-19 23:22:44 +02:00
|
|
|
|
2022-05-25 12:52:02 +02:00
|
|
|
return Questions.NONE
|