Getting a JSON response instead of a text message

Hello!

*I am sorry if I am posting it in the wrong place…

I am trying to follow this tutorial (https://rasa.com/docs/rasa/user-guide/building-assistants/#id8).

After I execute the command

rasa shell

When I send a message to the bot, it replies with a json file instead of a text message.

What can be wrong?

(rasavenv) Pessoal@bcarneiro rasa-assistant % rasa train /Users/Pessoal/rasavenv/lib/python3.7/site-packages/rasa/core/domain.py:151: FutureWarning: No tracker session configuration was found in the loaded domain. Domains without a session config will automatically receive a session expiration time of 60 minutes in Rasa version 2.0 if not configured otherwise. session_config = cls._get_session_config(data.get(SESSION_CONFIG_KEY, {})) No stories present. Just a Rasa NLU model will be trained. Training NLU model… 2020-06-03 09:10:20 INFO rasa.nlu.training_data.training_data - Training data stats: 2020-06-03 09:10:20 INFO rasa.nlu.training_data.training_data - Number of intent examples: 23 (3 distinct intents) 2020-06-03 09:10:20 INFO rasa.nlu.training_data.training_data - Found intents: β€˜greet’, β€˜bye’, β€˜thank’ 2020-06-03 09:10:20 INFO rasa.nlu.training_data.training_data - Number of response examples: 0 (0 distinct responses) 2020-06-03 09:10:20 INFO rasa.nlu.training_data.training_data - Number of entity examples: 0 (0 distinct entities) 2020-06-03 09:10:20 INFO rasa.nlu.model - Starting to train component WhitespaceTokenizer 2020-06-03 09:10:20 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:20 INFO rasa.nlu.model - Starting to train component RegexFeaturizer 2020-06-03 09:10:20 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:20 INFO rasa.nlu.model - Starting to train component LexicalSyntacticFeaturizer 2020-06-03 09:10:20 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:20 INFO rasa.nlu.model - Starting to train component CountVectorsFeaturizer 2020-06-03 09:10:20 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:20 INFO rasa.nlu.model - Starting to train component CountVectorsFeaturizer 2020-06-03 09:10:20 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:20 INFO rasa.nlu.model - Starting to train component DIETClassifier /Users/Pessoal/rasavenv/lib/python3.7/site-packages/rasa/utils/common.py:351: UserWarning: You specified β€˜DIET’ to train entities, but no entities are present in the training data. Skip training of entities. Epochs: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 100/100 [00:05<00:00, 17.02it/s, t_loss=1.058, i_loss=0.001, i_acc=1.000] 2020-06-03 09:10:35 INFO rasa.utils.tensorflow.models - Finished training. 2020-06-03 09:10:35 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:35 INFO rasa.nlu.model - Starting to train component EntitySynonymMapper 2020-06-03 09:10:35 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:35 INFO rasa.nlu.model - Starting to train component ResponseSelector 2020-06-03 09:10:35 INFO rasa.nlu.selectors.response_selector - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents. 2020-06-03 09:10:35 INFO rasa.nlu.model - Finished training component. 2020-06-03 09:10:35 INFO rasa.nlu.model - Successfully saved model into β€˜/var/folders/nd/f8y5zkb51c958kr6k1q_y3v80000gp/T/tmpfyfcth1s/nlu’ NLU model training completed. /Users/Pessoal/rasavenv/lib/python3.7/site-packages/rasa/core/domain.py:151: FutureWarning: No tracker session configuration was found in the loaded domain. Domains without a session config will automatically receive a session expiration time of 60 minutes in Rasa version 2.0 if not configured otherwise. session_config = cls._get_session_config(data.get(SESSION_CONFIG_KEY, {})) Your Rasa model is trained and saved at β€˜/Users/Pessoal/Projects/rasa-assistant/models/nlu-20200603-091035.tar.gz’. (rasavenv) Pessoal@bcarneiro rasa-assistant % rasa shell NLU model loaded. Type a message and press enter to parse it. Next message: bye! { β€œintent”: { β€œname”: β€œbye”, β€œconfidence”: 0.9999997615814209 }, β€œentities”: , β€œintent_ranking”: [ { β€œname”: β€œbye”, β€œconfidence”: 0.9999997615814209 }, { β€œname”: β€œthank”, β€œconfidence”: 9.6994156706387e-08 }, { β€œname”: β€œgreet”, β€œconfidence”: 9.375192888683159e-08 } ], β€œresponse_selector”: { β€œdefault”: { β€œresponse”: { β€œname”: null, β€œconfidence”: 0.0 }, β€œranking”: , β€œfull_retrieval_intent”: null } }, β€œtext”: β€œbye!” } Next message:

Hi! Looks like you’ve accidentally trained an NLU-only model: Your Rasa model is trained and saved at β€˜/Users/Pessoal/Projects/rasa-assistant/models/nlu-20200603-091035.tar.gz’

In doing so, when you use rasa shell you automatically do rasa shell nlu which just parses user messages.

This is why it trained only NLU: No stories present. Just a Rasa NLU model will be trained.

Perhaps your stories aren’t in the data directory?

1 Like

Thank you @erohmensing!

I have created the file in the root folder instead of the data folder.