How to avoid delay loading of nlu model

When I am chating with the bot for the first time, I am getting repeated responses. Only for the first time.

To help you debug I’ll need a little bit more information, could you share the output from the terminal?

action server: 2020-05-01 12:53:42 DEBUG rasa_sdk.utils - Using the default number of Sanic workers (1). 2020-05-01 12:55:15 DEBUG rasa_sdk.executor - Received request to run ‘action_session_start’ 2020-05-01 12:55:17 DEBUG rasa_sdk.executor - Finished running ‘action_session_start’

facebook server: 2020-05-01 12:53:34 DEBUG rasa.cli.utils - Parameter ‘endpoints’ not set. Using default location ‘endpoints.yml’ instead. 2020-05-01 12:53:36 DEBUG rasa.model - Extracted model to ‘/tmp/tmpl6q2cmzh’. 2020-05-01 12:53:37 INFO root - Connecting to channel ‘facebook’ which was specified by the ‘–connector’ argument. Any other channels will be ignored. To connect to all given channels, omit the ‘–connector’ argument. 2020-05-01 12:53:37 DEBUG sanic.root - CORS: Configuring CORS with resources: {‘/‘: {‘origins’: [’‘], ‘methods’: ‘DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT’, ‘allow_headers’: [’.’], ‘expose_headers’: None, ‘supports_credentials’: True, ‘max_age’: None, ‘send_wildcard’: False, ‘automatic_options’: True, ‘vary_header’: True, ‘resources’: {‘/*’: {‘origins’: ‘’}}, ‘intercept_exceptions’: True, ‘always_send’: True}} 2020-05-01 12:53:37 DEBUG rasa.core.utils - Available web server routes: /webhooks/facebook GET fb_webhook.health /webhooks/facebook/webhook GET fb_webhook.token_verification /webhooks/facebook/webhook POST fb_webhook.webhook / GET hello 2020-05-01 12:53:37 INFO root - Starting Rasa server on http://localhost:5004 2020-05-01 12:53:37 DEBUG rasa.core.utils - Using the default number of Sanic workers (1). 2020-05-01 12:53:37 INFO root - Enabling coroutine debugging. Loop id 101662264. 2020-05-01 12:53:39 DEBUG rasa.model - Extracted model to ‘/tmp/tmpfh1gw9xa’. 2020-05-01 12:53:46 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore. 2020-05-01 12:53:46 DEBUG rasa.core.lock_store - Connected to lock store ‘InMemoryLockStore’. 2020-05-01 12:53:49 DEBUG rasa.model - Extracted model to ‘/tmp/tmpwp24gqz8’. 2020-05-01 12:53:49 DEBUG pykwalify.compat - Using yaml library: /home/sg/rasa1.6.1/lib/python3.6/site-packages/ruamel/yaml/init.py 2020-05-01 12:53:51 DEBUG rasa.core.nlg.generator - Instantiated NLG to ‘TemplatedNaturalLanguageGenerator’. 2020-05-01 12:55:15 DEBUG rasa.core.tracker_store - Creating a new tracker for id ‘3085334084824782’. 2020-05-01 12:55:15 DEBUG rasa.core.processor - Starting a new session for conversation ID ‘3085334084824782’. 2020-05-01 12:55:15 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘action_session_start’. 2020-05-01 12:55:17 DEBUG rasa.core.processor - Action ‘action_session_start’ ended with events ‘[<rasa.core.events.SessionStarted object at 0x7f9c0c4b4550>, <rasa.core.events.SlotSet object at 0x7f9c0c4b42b0>, <rasa.core.events.SlotSet object at 0x7f9c0c4b4208>, <rasa.core.events.SlotSet object at 0x7f9c0c4b4d68>, <rasa.core.events.SlotSet object at 0x7f9c0c4b44a8>]’. 2020-05-01 12:55:17 DEBUG rasa.core.processor - Current slot values: cab_category: None cuisine: None date: None first_name: Vinayak from_date: None from_location: None item_name: None language: None last_name: SG level: None location: None max_value: None min_value: None movie_name: None name_of_action: None num_adults: None num_female: None num_kids: None num_male: None num_rooms: None preference: None quota: None recipient_emailid: None requested_slot: None save_emailid: None shopping_category: None spec_id: Vinayak_SG_3085334084824782 theater_name: None ticket_category: None to_date: None to_location: None use_default_emailid: None user_emailid: vinayaksg01@gmail.com 2020-05-01 12:55:17 DEBUG rasa.core.processor - Received user message ‘/greet’ with intent ‘{‘name’: ‘greet’, ‘confidence’: 1.0}’ and entities ‘’ 2020-05-01 12:55:17 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 7 events. 2020-05-01 12:55:17 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-01 12:55:17 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, None, None, None, None, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}] 2020-05-01 12:55:17 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-01 12:55:17 DEBUG rasa.core.policies.form_policy - There is no active form 2020-05-01 12:55:17 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, ‘greet’. 2020-05-01 12:55:17 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_KerasPolicy 2020-05-01 12:55:17 DEBUG rasa.core.processor - Predicted next action ‘utter_greet’ with confidence 0.98. 2020-05-01 12:55:17 DEBUG rasa.core.processor - Action ‘utter_greet’ ended with events ‘[BotUttered(‘Hey there! How may I help you ?’, {“elements”: null, “quick_replies”: null, “buttons”: null, “attachment”: null, “image”: null, “custom”: null}, {}, 1588317917.8668108)]’. 2020-05-01 12:55:18 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-01 12:55:18 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, None, None, None, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}] 2020-05-01 12:55:18 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-01 12:55:18 DEBUG rasa.core.policies.form_policy - There is no active form 2020-05-01 12:55:18 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, ‘greet’. 2020-05-01 12:55:18 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_KerasPolicy 2020-05-01 12:55:18 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 0.98. 2020-05-01 12:55:18 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘’. 2020-05-01 12:55:18 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘3085334084824782’. /usr/lib/python3.6/asyncio/coroutines.py:110: ResourceWarning: unclosed <ssl.SSLSocket fd=39, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘2409:4073:17:8415:d4f2:1434:6fd1:f641’, 52470, 0, 0), raddr=(‘2a03:2880:f037:12:face:b00c:0:2’, 443, 0, 0)> return self.gen.send(None) 2020-05-01 12:55:30 DEBUG rasa.core.tracker_store - Recreating tracker for id ‘3085334084824782’ 2020-05-01 12:55:53 DEBUG rasa.core.processor - Received user message ‘hi’ with intent ‘{‘name’: ‘greet’, ‘confidence’: 0.9696241021156311}’ and entities ‘’ 2020-05-01 12:55:53 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 11 events. 2020-05-01 12:55:53 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-01 12:55:53 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, None, None, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘prev_action_listen’: 1.0}] 2020-05-01 12:55:53 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-01 12:55:53 DEBUG rasa.core.policies.form_policy - There is no active form 2020-05-01 12:55:53 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_KerasPolicy 2020-05-01 12:55:53 DEBUG rasa.core.processor - Predicted next action ‘utter_greet’ with confidence 1.00. 2020-05-01 12:55:53 DEBUG rasa.core.processor - Action ‘utter_greet’ ended with events ‘[BotUttered(‘Hey there! How may I help you ?’, {“elements”: null, “quick_replies”: null, “buttons”: null, “attachment”: null, “image”: null, “custom”: null}, {}, 1588317953.3926964)]’. 2020-05-01 12:55:55 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-01 12:55:55 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, None, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘prev_action_listen’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0}] 2020-05-01 12:55:55 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-01 12:55:55 DEBUG rasa.core.policies.form_policy - There is no active form 2020-05-01 12:55:55 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, ‘greet’. 2020-05-01 12:55:55 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_KerasPolicy 2020-05-01 12:55:55 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 1.00. 2020-05-01 12:55:55 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘’. 2020-05-01 12:55:55 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘3085334084824782’. /usr/lib/python3.6/asyncio/coroutines.py:110: ResourceWarning: unclosed <ssl.SSLSocket fd=38, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘2409:4073:17:8415:d4f2:1434:6fd1:f641’, 52480, 0, 0), raddr=(‘2a03:2880:f037:12:face:b00c:0:2’, 443, 0, 0)> return self.gen.send(None) 2020-05-01 12:55:55 DEBUG rasa.core.tracker_store - Recreating tracker for id ‘3085334084824782’ 2020-05-01 12:55:55 DEBUG rasa.core.processor - Received user message ‘hi’ with intent ‘{‘name’: ‘greet’, ‘confidence’: 0.9696241021156311}’ and entities ‘’ 2020-05-01 12:55:55 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 15 events. 2020-05-01 12:55:55 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-01 12:55:55 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘prev_action_listen’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘prev_action_listen’: 1.0}] 2020-05-01 12:55:55 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-01 12:55:55 DEBUG rasa.core.policies.form_policy - There is no active form 2020-05-01 12:55:55 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_KerasPolicy 2020-05-01 12:55:55 DEBUG rasa.core.processor - Predicted next action ‘utter_greet’ with confidence 1.00. 2020-05-01 12:55:55 DEBUG rasa.core.processor - Action ‘utter_greet’ ended with events ‘[BotUttered(‘Hey there! How may I help you ?’, {“elements”: null, “quick_replies”: null, “buttons”: null, “attachment”: null, “image”: null, “custom”: null}, {}, 1588317955.100158)]’. 2020-05-01 12:55:55 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3). 2020-05-01 12:55:55 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘intent_greet’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘prev_action_listen’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0, ‘prev_action_listen’: 1.0}, {‘slot_first_name_0’: 1.0, ‘intent_greet’: 1.0, ‘slot_last_name_0’: 1.0, ‘prev_utter_greet’: 1.0, ‘slot_user_emailid_0’: 1.0, ‘slot_spec_id_0’: 1.0}] 2020-05-01 12:55:55 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-05-01 12:55:55 DEBUG rasa.core.policies.form_policy - There is no active form 2020-05-01 12:55:55 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, ‘greet’. 2020-05-01 12:55:55 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_KerasPolicy 2020-05-01 12:55:55 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 1.00. 2020-05-01 12:55:55 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘’. 2020-05-01 12:55:55 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘3085334084824782’. /usr/lib/python3.6/asyncio/coroutines.py:110: ResourceWarning: unclosed <ssl.SSLSocket fd=39, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘2409:4073:17:8415:d4f2:1434:6fd1:f641’, 52486, 0, 0), raddr=(‘2a03:2880:f037:12:face:b00c:0:2’, 443, 0, 0)> return self.gen.send(None)