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

properly instantiate domain properties #1634

Merged
merged 5 commits into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ 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
tmbo marked this conversation as resolved.
Show resolved Hide resolved
-----
- ``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
25 changes: 14 additions & 11 deletions rasa_core/training/interactive.py
Original file line number Diff line number Diff line change
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()})

new_domain = Domain.from_dict(domain_dict)
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(
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