# In[40]: action_endpoint = EndpointConfig(url="http://localhost:5055/webhook") # In[41]: agent_model_path = os.path.join(model_dir, policy_fixed_model_name) agent = Agent.load(agent_model_path, interpreter=interpreter, action_endpoint=action_endpoint) # In[44]: loop = asyncio.get_event_loop() rst = loop.run_until_complete( agent.parse_message_using_nlu_interpreter("count")) # In[45]: print(rst) # In[46]: umsg = "hi" print(umsg) loop = asyncio.get_event_loop() responses = loop.run_until_complete( agent.handle_text(text_message=umsg, sender_id='1')) # In[47]: print(responses)