File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change
1
+ Fixed bug where ``FallbackPolicy `` would always fall back if the fallback action is
2
+ ``action_listen ``.
Original file line number Diff line number Diff line change @@ -144,7 +144,15 @@ def predict_action_probabilities(
144
144
145
145
nlu_data = tracker .latest_message .parse_data
146
146
147
- if tracker .latest_action_name == self .fallback_action_name :
147
+ if (
148
+ tracker .latest_action_name == self .fallback_action_name
149
+ and tracker .latest_action_name != ACTION_LISTEN_NAME
150
+ ):
151
+ logger .debug (
152
+ "Predicted 'action_listen' after fallback action '{}'" .format (
153
+ self .fallback_action_name
154
+ )
155
+ )
148
156
result = self ._default_predictions (domain )
149
157
idx = domain .index_for_action (ACTION_LISTEN_NAME )
150
158
result [idx ] = 1.0
You can’t perform that action at this time.
0 commit comments