Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correctly (don't) interpolate non-text values in custom responses #6280

Merged
merged 5 commits into from
Jul 28, 2020

Conversation

erohmensing
Copy link
Contributor

@erohmensing erohmensing commented Jul 27, 2020

Proposed changes:

Note: when 1.10.x is merged to master, we need to revert the change in the above PR, as it won't show in the diff

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@erohmensing erohmensing requested a review from chkoss July 27, 2020 09:55
Copy link
Contributor

@chkoss chkoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution, thanks for adding the doc strings, too! 🚀

rasa/core/nlg/interpolator.py Outdated Show resolved Hide resolved
@chkoss
Copy link
Contributor

chkoss commented Jul 28, 2020

About the failing type check: maybe we have to add # pytype: disable=pyi-error to the line 8 in rasa.core.nlg.template, where we do from rasa.core.nlg.generator import NaturalLanguageGenerator.

The issue is probably that in rasa.core.nlg.generator there is a function _create_from_endpoint_config which does from rasa.core.nlg import TemplatedNaturalLanguageGenerator, so the type checker thinks there is a cyclical import. In fact, that isn't really a problem (I think), so we can disable it.

@erohmensing erohmensing merged commit 4c62cf4 into 1.10.x Jul 28, 2020
@erohmensing erohmensing deleted the interpolate branch July 28, 2020 15:44
@erohmensing erohmensing mentioned this pull request Jul 28, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants