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

Commit

Permalink
fix: fix error with bf_forms slot when undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Cote-Boucher committed Jul 1, 2020
1 parent 63ab95f commit 82ca6d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rasa/core/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def predict_next_action(
from rasa.core.slots import Slot # bf
action = self.domain.action_for_index(
max_confidence_index, self.action_endpoint,
tracker.slots.get("bf_forms", Slot("bf_forms")).initial_value, # bf
tracker.slots.get("bf_forms", Slot("bf_forms", initial_value=[])).initial_value, # bf
)

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

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

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

0 comments on commit 82ca6d7

Please sign in to comment.