diff --git a/system_mockup/generator_jezyka_nautalnego.py b/system_mockup/generator_jezyka_nautalnego.py index 3581efe..6359924 100644 --- a/system_mockup/generator_jezyka_nautalnego.py +++ b/system_mockup/generator_jezyka_nautalnego.py @@ -4,16 +4,15 @@ welcome = 'Witaj!' unknown = "Nie rozumiem." end = "Żegnaj!" help = "Obsługuję przekazywanie informacji z systemu GitHub - repozytoria, pull requesty, issue, powiadomienia." +#todo dodać więcej odpowiedzi +#todo generator powinien przyjmować zwrotkę z taktyki dialogu def generator_jezyka_nautalnego(frame, question, state): if question != Questions.NONE: #ask additional questions if question == Questions.TIME: print("Z jakiego czasu?") - elif len(state) > 2 and state[-2]['questions'] != Questions.NONE and frame['act'] != "": - print("Przyjęto odpowiedź na pytanie.") - else: #dont ask questions if frame['act'] == "hello": diff --git a/system_mockup/monitor_stanu_dialogowego.py b/system_mockup/monitor_stanu_dialogowego.py index 6f996ef..abebf0e 100644 --- a/system_mockup/monitor_stanu_dialogowego.py +++ b/system_mockup/monitor_stanu_dialogowego.py @@ -1,6 +1,7 @@ dialogue_state = [] iterator = 1 +#todo uporzadkować def monitor_stanu_dialogowego(frame, questions): global iterator # Some frames can reset the dialogue state, like saying hello. diff --git a/system_mockup/system_dialogowy.py b/system_mockup/system_dialogowy.py index 731e6b9..f00e6c4 100644 --- a/system_mockup/system_dialogowy.py +++ b/system_mockup/system_dialogowy.py @@ -11,8 +11,9 @@ def main(): text = input('>>>') frame = analizator_jezyka_naturalnego(text) + #{'act': 'notifications', 'slots': [('time_when', None), ('liczba', ''), ('timeunit', None)]} - questions = taktyka_dialogu(frame) + questions = taktyka_dialogu(frame) # todo dodac stan state = monitor_stanu_dialogowego(frame, questions) diff --git a/system_mockup/taktyka_dialogu.py b/system_mockup/taktyka_dialogu.py index 9149389..5bc36a7 100644 --- a/system_mockup/taktyka_dialogu.py +++ b/system_mockup/taktyka_dialogu.py @@ -5,11 +5,12 @@ class Questions(Enum): REPO = "repo" NONE = "none" +#todo taktyka ma zwracać bardziej złożony obiekt def taktyka_dialogu(frame): return questions(frame) - # TODO inna taktyka - +#todo dodac wiecej casow +#brac pod uwage stan def questions(frame): for slot in frame['slots']: @@ -19,4 +20,7 @@ def questions(frame): if slot[0] == "repo" and (slot[1] == None or slot[1] == ""): return Questions.REPO - return Questions.NONE \ No newline at end of file + return Questions.NONE + + +#todo dodać mock github api \ No newline at end of file