Hello, I configured my file with these codes. It works, When I emit with javascript, it returns 200 OK with POST. But I can’t get data. Do you think I can’t handle messages without Webchat? Do I have to make Django configuration to make it run correctly? I just want to setup an endpoint to give my teammates, they will listen my channel if an request submitted.
Code here;
from rasa_core.agent import Agent from rasa_core.channels.socketio import SocketIOInput from pather import Path interpreter = RasaNLUInterpreter(Path.TRADE_NLU_FILE.value) agent = Agent.load(Path.DIALOGUE.value, interpreter=interpreter)
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="message",
# socket.io namespace to use for the messages
namespace = None
)
s = agent.handle_channels([input_channel], 5004, serve_forever=True)
JS CODE:
socket.emit(“user_uttered”,SOME DIV)
Thanks for reply, this is my school project, I have to finish my configuration till Sunday.