You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system (windows, osx, ...): Debian & OSX
Issue:
When metadata is passed in a new session, the metadata is correctly shown in the rasa core debug message but it is not passed to ActionSessionStart.
classActionSessionStart(Action):
defname(self) ->Text:
return"action_session_start"@staticmethoddef_slot_set_events_from_tracker(
tracker: "DialogueStateTracker",
) ->List["SlotSet"]:
"""Fetch SlotSet events from tracker and carry over key, value and metadata."""fromrasa.core.eventsimportSlotSetreturn [
SlotSet(key=event.key, value=event.value, metadata=event.metadata)
foreventintracker.applied_events()
ifisinstance(event, SlotSet)
]
asyncdefrun(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) ->List[EventType]:
logger.info(f"run action_session_start")
# the session should begin with a `session_started` eventevents= [SessionStarted()]
# any slots that should be carried over should come after the# `session_started` event`events.extend(self._slot_set_events_from_tracker(tracker))
# Grab slots from metadatamessage_metadata= []
foreintracker.events[::-1]:
# Does this tracker event have metadata?if"metadata"ineande["metadata"] !=None:
message_metadata=e["metadata"]
# Does this metadata have slots?ifmessage_metadataand"slots"inmessage_metadata:
forkey, valueinmessage_metadata["slots"].items():
logger.info(f"{key} | {value}")
ifvalueisnotNone:
events.append(SlotSet(key=key, value=value))
breakiflen(message_metadata) ==0:
logger.warn(f"session_start but no metadata, tracker.events: {tracker.events}")
# an `action_listen` should be added at the end as a user message followsevents.append(ActionExecuted("action_listen"))
returnevents
The text was updated successfully, but these errors were encountered:
rgstephens
added
the
type:bug 🐛
Inconsistencies or issues which will cause an issue or problem for users or implementors.
label
Apr 3, 2020
Rasa version: 1.9.4
Rasa SDK version (if used & relevant): 1.9.0
Rasa X version (if used & relevant): not used
Python version: 3.7
Operating system (windows, osx, ...): Debian & OSX
Issue:
When metadata is passed in a new session, the metadata is correctly shown in the rasa core debug message but it is not passed to ActionSessionStart.
Video debug session.
ActionSessionStart code:
The text was updated successfully, but these errors were encountered: