diff --git a/system_mockup/system_dialogowy.py b/system_mockup/system_dialogowy.py index e09e55b..fd0e899 100644 --- a/system_mockup/system_dialogowy.py +++ b/system_mockup/system_dialogowy.py @@ -10,7 +10,7 @@ def main(): text = input('>>>') frame = analizator_jezyka_naturalnego(text) state = monitor_stanu_dialogowego(frame) - response_frames = taktyka_dialogu(state) + response_frames = taktyka_dialogu(state, frame) generator_jezyka_nautalnego(response_frames) if __name__ == '__main__': diff --git a/system_mockup/taktyka_dialogu.py b/system_mockup/taktyka_dialogu.py index 992aec3..36e5a18 100644 --- a/system_mockup/taktyka_dialogu.py +++ b/system_mockup/taktyka_dialogu.py @@ -10,18 +10,18 @@ def check_condition(state, conditions, type=all): return False -def taktyka_dialogu(state): - if should_respond_gently(state): +def taktyka_dialogu(state, frame): + if should_respond_gently(frame): return [hello_act, name_response_act] - if should_prompt(state): + if should_prompt(frame): return [hello_act, help_response_act] - if should_respond_cold(state): + if should_respond_cold(frame): return [name_response_act] return [unknown_act] def should_respond_gently(state): - return check_condition(state, [hello_act, name_request_act]) + return check_condition(state, [hello_act, name_request_act]) def should_prompt(state):