Skip to content

Commit

Permalink
Merge branch 'master' into token-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
rasabot authored Jul 6, 2020
2 parents 9915f00 + dcb0f2d commit 7c88a45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog/5453.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Issue : If custom utter message contains no value or integer value, then it fails returning custom utter message
Fix : Converted template of type string
2 changes: 1 addition & 1 deletion rasa/core/nlg/interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def interpolate_text(template: Text, values: Dict[Text, Text]) -> Text:
# (a) newline in slot name
# (b) { or } in slot name
try:
text = re.sub(r"{([^\n{}]+?)}", r"{0[\1]}", template)
text = re.sub(r"{([^\n{}]+?)}", r"{0[\1]}", str(template))
text = text.format(values)
if "0[" in text:
# regex replaced tag but format did not replace
Expand Down

0 comments on commit 7c88a45

Please sign in to comment.