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

Response key deleted by MarkdownStoryReader #7034

Closed
samsucik opened this issue Oct 16, 2020 · 1 comment · Fixed by #7080
Closed

Response key deleted by MarkdownStoryReader #7034

samsucik opened this issue Oct 16, 2020 · 1 comment · Fixed by #7080
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@samsucik
Copy link
Contributor

Rasa version: 2.0.0

Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant):

Python version: 3.7.9

Operating system (windows, osx, ...): OSX

Issue: When I read the following e2e testing story:

## id
* out_of_scope/other: hahaha
    - utter_out_of_scope/other

the story is read by rasa.shared.core.training_data.story_reader.markdown_story_reader.MarkdownStoryReader in a way that destroys the response key in the retrieval intent. Note that the key in the response action remains there as it should.

Command or request that led to error:

from rasa.shared.core.training_data.story_reader.markdown_story_reader import MarkdownStoryReader as reader
reader.read_from_file("story.md")

Note that this is closely tied to #7002 but applies to Markdown stories, not yaml.

@samsucik samsucik added type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Oct 16, 2020
@samsucik
Copy link
Contributor Author

I managed to solve this for my use case by changing this line from

intent = {INTENT_NAME_KEY: parsed.get("intent")}

to

intent = {INTENT_NAME_KEY: parsed.get("intent_response_key", default=parsed.get("intent"))}

i.e. by using the full retrieval intent when available.

There may be other related edge case but at least in my case this seems to be a fix :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants