I am trying to add the https://github.com/JustinaPetr/Weatherbot_Tutorial ‘WEATHER BOT’ to a website. (Or sample HTML) page. I used the steps given in Advanced Usage with a custom Rasa Core project as Custom Channel from Python .
Following is the code I ran (‘run_application.py’) after executing the previous steps suggested in the page (i.e. Steps under Basic Usage - Running build and HTML page for your Chatroom)
import os
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 bot_server_channel import BotServerInputChannel
# Creating the Interpreter and Agent
def load_agent():
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/productnlu')
agent = Agent.load('./models/dialogue', interpreter = nlu_interpreter)
# Creating the server
def main_server():
agent = load_agent()
channel = BotServerInputChannel(agent, port=cmdline_args.port)
agent.handle_channels([channel], http_port=cmdline_args.port)
main_server()
Got the following error:
Traceback (most recent call last):
File "run_application.py", line 26, in <module>
main_server()
File "run_application.py", line 23, in main_server
channel = BotServerInputChannel(agent, port=cmdline_args.port)
NameError: name 'cmdline_args' is not defined
Different issue as it occurred in the same code line after changing the port number.
Got error @ agent.handle_channels([channel], http_port=5005)
Traceback (most recent call last):
File "run_application.py", line 23, in <module>
main_server()
File "run_application.py", line 21, in main_server
agent.handle_channels([channel], http_port=5005)
AttributeError: 'NoneType' object has no attribute 'handle_channels'
@vishnuragas in order to use this script, I tried to start chatroom (yarn serve) > action server> then run_application.py, but I can’t run the rasa_core.run command though because it says port 5005 has been used. Do you know how to solve this issue?
Hello Friend,
I have just cloned chatroom github repo and tried running it.I m getting this error.Please let me know how to fix it.
Basically my main aim is to integrate my rasa with UI interface which take text and voice, both as input.I am stuck with this UI getting ./dist/chatroom.css not found.
step i used to run this repo:
yarn build
yarn watch
yarn serve
Open http://localhost:8080/index.html in my browser