@JiteshGaikwad i am using GitHub - JiteshGaikwad/Chatbot-Widget: ChatBot widget easy to connect to RASA bot through REST channel for ui of my rasa chat bot i have used the following code in my connect.py
from rasa_core.channels import SocketIOInput
from rasa_core.agent import Agent
from rasa_core.interpreter import RegexInterpreter
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_core.utils import EndpointConfig
from rasa_core.policies import KerasPolicy, MemoizationPolicy
load your trained agent
interpreter = RasaNLUInterpreter(‘rasa/models/nlu/profiler/nlu’)
agent = Agent.load(‘rasa/models/dialogue’,
interpreter=interpreter,
action_endpoint=EndpointConfig('http://localhost:5055/webhook')
#for action endpoint
)
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
)
set serve_forever=True if you want to keep the server running
s = agent.handle_channels([input_channel], 5500, serve_forever=True)
and i have use this in my credentials.yml
rest:
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
rasa:
url: http://localhost:5055/webhook
do i have to add something more in my code like in rasa code to send data or it is sufficient.
thank you.