Skip to content
This repository was archived by the owner on Aug 22, 2019. It is now read-only.

Commit df2056c

Browse files
committed
Merge branch 'fix-mapping-policy' into merge-mapping-fix
2 parents 41bb59f + 8d88f61 commit df2056c

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

docs/core/old_core_changelog.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ Fixed
4141
- in interactive learning: only updates entity values if user changes annotation
4242

4343

44+
[0.14.1] - 2019-05-02
45+
^^^^^^^^^^^^^^^^^^^^^
46+
47+
Fixed
48+
-----
49+
- fixed MappingPolicy bug upon prediction of ACTION_LISTEN after mapped action
50+
51+
4452
[0.14.0] - 2019-04-23
4553
^^^^^^^^^^^^^^^^^^^^^
4654
Added
@@ -62,7 +70,7 @@ Added
6270
- ``Tracker.active_form`` now includes ``trigger_message`` attribute to allow
6371
access to message triggering the form
6472
- ``MappingPolicy`` which can be used to directly map an intent to an action
65-
by adding the ``maps_to`` keyword to an intent in the domain.
73+
by adding the ``triggers`` keyword to an intent in the domain.
6674
- default action ``action_back``, which when triggered with ``/back`` allows
6775
the user to undo their previous message
6876

@@ -1005,4 +1013,3 @@ First released version.
10051013
.. _`master`: https://github.com/RasaHQ/rasa_core/
10061014

10071015
.. _`Semantic Versioning`: http://semver.org/
1008-

rasa/core/policies/mapping_policy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def predict_action_probabilities(self,
6161
prediction[idx] = 1
6262
elif tracker.latest_action_name == action and action is not None:
6363
latest_action = tracker.get_last_event_for(ActionExecuted)
64-
assert latest_action.name == action
64+
assert latest_action.action_name == action
6565

6666
if latest_action.policy == type(self).__name__:
6767
# this ensures that we only predict listen, if we predicted

tests/core/test_domain.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ def test_merge_yaml_domains():
254254
([{'greet': {'use_entities': False}}, 'goodbye'],
255255
{'greet': {'use_entities': False},
256256
'goodbye': {'use_entities': True}}),
257-
([{'greet': {'maps_to': 'utter_goodbye'}}, 'goodbye'],
258-
{'greet': {'use_entities': True, 'maps_to': 'utter_goodbye'},
257+
([{'greet': {'triggers': 'utter_goodbye'}}, 'goodbye'],
258+
{'greet': {'use_entities': True, 'triggers': 'utter_goodbye'},
259259
'goodbye': {'use_entities': True}}),
260-
([{'greet': {'maps_to': 'utter_goodbye', 'use_entities': False}},
260+
([{'greet': {'triggers': 'utter_goodbye', 'use_entities': False}},
261261
{'goodbye': {'use_entities': False}}],
262-
{'greet': {'use_entities': False, 'maps_to': 'utter_goodbye'},
262+
{'greet': {'use_entities': False, 'triggers': 'utter_goodbye'},
263263
'goodbye': {'use_entities': False}})])
264264
def test_collect_intent_properties(intent_list, intent_properties):
265265
assert Domain.collect_intent_properties(intent_list) == intent_properties

0 commit comments

Comments
 (0)