Skip to content

Commit

Permalink
amend if check to step id comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ancalita committed Sep 12, 2023
1 parent 539e8f9 commit 614acf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rasa/core/policies/flow_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,9 @@ def _run_step(
if action_name in self.domain.action_names_or_texts:
structlogger.debug("flow.step.run.action", context=context)

if action_name.startswith("utter_ask_"):
if step.id == "ask_collect_information":
# increment number of retries to keep track of how many times
# the question has been asked
top_frame = self.dialogue_stack.top()
if isinstance(top_frame, CollectInformationPatternFlowStackFrame):
top_frame.number_of_retries = top_frame.number_of_retries + 1
Expand Down

0 comments on commit 614acf0

Please sign in to comment.