Systemy_dialogowe/system_mockup/taktyka_dialogu.py

26 lines
586 B
Python
Raw Normal View History

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-06-01 12:53:12 +02:00
#todo taktyka ma zwracać bardziej złożony obiekt
2022-06-01 12:22:40 +02:00
def taktyka_dialogu(frame):
2022-05-25 12:52:02 +02:00
return questions(frame)
2022-04-19 23:22:44 +02:00
2022-06-01 12:53:12 +02:00
#todo dodac wiecej casow
#brac pod uwage stan
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-06-01 12:53:12 +02:00
return Questions.NONE
#todo dodać mock github api