Skip to content

Commit

Permalink
Merge branch 'master' into trigger-intent-channel
Browse files Browse the repository at this point in the history
  • Loading branch information
rasabot authored Sep 8, 2020
2 parents 4f5d8ab + f62839e commit bcb6eea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions rasa/core/nlg/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def nlg_response_format_spec() -> Dict[Text, Any]:
"elements": {"type": ["array", "null"], "items": {"type": "object"}},
"attachment": {"type": ["object", "null"]},
"image": {"type": ["string", "null"]},
"custom": {"type": "object"},
},
}

Expand Down
5 changes: 5 additions & 0 deletions tests/core/test_nlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def test_nlg_schema_validation_empty_image():
assert CallbackNaturalLanguageGenerator.validate_response(content)


def test_nlg_schema_validation_empty_custom_dict():
content = {"custom": {}}
assert CallbackNaturalLanguageGenerator.validate_response(content)


@pytest.mark.parametrize(
"slot_name, slot_value",
[
Expand Down

0 comments on commit bcb6eea

Please sign in to comment.