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

Commit

Permalink
Merge branch 'master' into slotname_error
Browse files Browse the repository at this point in the history
  • Loading branch information
imLew committed Jan 28, 2019
2 parents d9c12be + 6cdb347 commit 48b4c2f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.rst
Expand Up @@ -6,23 +6,25 @@ This project adheres to `Semantic Versioning`_ starting with version 0.2.0.

.. _master-release:

[Unreleased 0.13.1.aX] - `master`_
[Unreleased 0.14.0.aX] - `master`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note:: This version is not yet released and is under active development.

Added
-----
- ``message_id`` can now be passed in the payload to the ``NLUHttpInterpreter``

Removed
Changed
-------

Changed
Removed
-------
- ``message_id`` can now be passed in the payload to the ``NLUHttpInterpreter``

Fixed
-----
- fixed domain persistence after exiting interactive learning
- fix form validation question error in interactive learninig

.. _v0-13-0:

Expand Down
1 change: 1 addition & 0 deletions binder/requirements.txt
@@ -1,3 +1,4 @@
-r ../requirements.txt

sklearn-crfsuite==0.3.6
service_identity==18.1.0
6 changes: 3 additions & 3 deletions docs/docker_walkthrough.rst
Expand Up @@ -533,8 +533,8 @@ Start with creating the custom actions in a directory ``actions``:
mkdir actions
# Rasa Core SDK expects a python module.
# Therefore, make sure that you have this file in the direcotry.
touch __init__.py
# Therefore, make sure that you have this file in the directory.
touch actions/__init__.py
touch actions/actions.py
Then build a custom action using the Rasa Core SDK, e.g.:
Expand Down Expand Up @@ -600,7 +600,7 @@ dependencies, e.g.:

.. code-block:: docker
# Extend the offical Rasa Core SDK image
# Extend the official Rasa Core SDK image
FROM rasa/rasa_core_sdk:latest
# Add a custom system library (e.g. git)
Expand Down
27 changes: 15 additions & 12 deletions rasa_core/training/interactive.py
Expand Up @@ -779,18 +779,21 @@ def _write_domain_to_file(
messages = _collect_messages(evts)
actions = _collect_actions(evts)

domain_dict = dict.fromkeys(domain.keys(), [])

# TODO for now there is no way to distinguish between action and form
domain_dict["forms"] = []
domain_dict["intents"] = _intents_from_messages(messages)
domain_dict["entities"] = _entities_from_messages(messages)
# do not automatically add default actions to the domain dict
domain_dict["actions"] = list({e["name"]
for e in actions
if e["name"] not in default_action_names()})
intent_properties = Domain.collect_intent_properties(
_intents_from_messages(messages))

collected_actions = list({e["name"]
for e in actions
if e["name"] not in default_action_names()})

new_domain = Domain.from_dict(domain_dict)
new_domain = Domain(
intent_properties=intent_properties,
entities=_entities_from_messages(messages),
slots=[],
templates={},
action_names=collected_actions,
form_names=[])

old_domain.merge(new_domain).persist_clean(domain_path)

Expand Down Expand Up @@ -884,9 +887,9 @@ def _confirm_form_validation(action_name, tracker, endpoint, sender_id):
validation_questions = questionary.confirm(
"Should '{}' validate user input to fill "
"the slot '{}'?".format(action_name, requested_slot))
form_answers = _ask_or_abort(validation_questions, sender_id, endpoint)
validate_input = _ask_or_abort(validation_questions, sender_id, endpoint)

if not form_answers["validation"]:
if not validate_input:
# notify form action to skip validation
send_event(endpoint, sender_id,
{"event": "form_validation", "validate": False})
Expand Down

0 comments on commit 48b4c2f

Please sign in to comment.