Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

Commit 82ca6d7

Browse files
author
Philippe Cote-Boucher
committed
fix: fix error with bf_forms slot when undefined
1 parent 63ab95f commit 82ca6d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rasa/core/processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def predict_next_action(
303303
from rasa.core.slots import Slot # bf
304304
action = self.domain.action_for_index(
305305
max_confidence_index, self.action_endpoint,
306-
tracker.slots.get("bf_forms", Slot("bf_forms")).initial_value, # bf
306+
tracker.slots.get("bf_forms", Slot("bf_forms", initial_value=[])).initial_value, # bf
307307
)
308308

309309
logger.debug(
@@ -453,7 +453,7 @@ def _log_unseen_features(self, parse_data: Dict[Text, Any]) -> None:
453453

454454
def _get_action(self, action_name, tracker) -> Optional[Action]: # bf
455455
from rasa.core.slots import Slot # bf
456-
bf_form_slot = tracker.slots.get("bf_forms", Slot("bf_forms")).initial_value, # bf
456+
bf_form_slot = tracker.slots.get("bf_forms", Slot("bf_forms", initial_value=[])).initial_value, # bf
457457
return self.domain.action_for_name(action_name, self.action_endpoint, bf_form_slot)
458458

459459
async def _parse_message(self, message, tracker: DialogueStateTracker = None):

0 commit comments

Comments
 (0)