Want to connet rasa stack with Socket IO


(Vishnu Narayanan S) #1

Hi, I have created a chatbot on slack using Rasa-Core and Rasa-NLU by watching this video : Building a chatbot with Rasa NLU and Rasa Core on Vimeo

from rasa_core.channels import HttpInputChannel from rasa_core.agent import Agent from rasa_core.interpreter import RasaNLUInterpreter

from rasa_slack_connector import SlackInput

from rasa_core.channels.socketio import SocketIOInput

nlu_interpreter = RasaNLUInterpreter(’./models/nlu/default/weathernlu’) agent = Agent.load(’./models/dialogue’, interpreter = nlu_interpreter)

input_channel = SlackInput(‘xoxp-486407263236-486777017637-495778367235-40f94f6c7a4dc548979abd59701ccd5f’, #app verification token

‘xoxb-486407263236-496080126117-Bj0Gf6DiG5WIdt0brcC9VFmx’, # bot verification token

‘og61doP1gQfgzwz6LBUqcyA8’, # slack verification token

True)

input_channel = SocketIOInput( # event name for messages sent from the user user_message_evt=“user_uttered”, # event name for messages sent from the bot bot_message_evt=“bot_uttered”, # socket.io namespace to use for the messages namespace=None ) agent.handle_channel(HttpInputChannel(5004, ‘/’, input_channel))

This is my run_app.py but showing the error message: python run_app.py Traceback (most recent call last): File “run_app.py”, line 5, in from rasa_core.channels import SocketIOInput ImportError: cannot import name ‘SocketIOInput’


I had tried this too’: C:\RASA DIRECTORY\Weatherbot>python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 Type “help”, “copyright”, “credits” or “license” for more information.

from rasa_core.channels.socketio import SocketIOInput Traceback (most recent call last): File “”, line 1, in ModuleNotFoundError: No module named ‘rasa_core.channels.socketio’

from rasa_core.channels import SocketIOInput Traceback (most recent call last): File “”, line 1, in ImportError: cannot import name ‘SocketIOInput’

from rasa_core.channels import SocketIOInput Traceback (most recent call last): File “”, line 1, in ImportError: cannot import name ‘SocketIOInput’

import rasa_core from rasa_core.channels import SocketIOInput Traceback (most recent call last): File “”, line 1, in ImportError: cannot import name ‘SocketIOInput’

from rasa_core import SocketIOInput Traceback (most recent call last): File “”, line 1, in ImportError: cannot import name ‘SocketIOInput’

import SocketIOInput Traceback (most recent call last): File “”, line 1, in ModuleNotFoundError: No module named ‘SocketIOInput’

PlEASE HELP ME TO SOLVE THIS!!!