All Projects → Alexmhack → Django-Rasa-Bot

Alexmhack / Django-Rasa-Bot

Licence: other
Integrating Rasa Core with Django backend and finally using Webchat for chatbot user interface

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Django-Rasa-Bot

clofus-chatbot
Clofus® Chat bot Platform using rasa core and rasa nlu similar to rasa x but opensource demo https://clofus.github.io/clofus-chatbot/
Stars: ✭ 61 (+103.33%)
Mutual labels:  rasa-nlu, rasa, rasa-core
GSTFAQChatbot
Set of scripts to build a chatbot which will answer FAQ about Goods and Services Tax (GST) India.
Stars: ✭ 37 (+23.33%)
Mutual labels:  rasa-nlu, rasa
small-talk-rasa-stack
Collection of casual conversations that can be used with the Rasa Stack
Stars: ✭ 87 (+190%)
Mutual labels:  rasa-nlu, rasa-core
rasa-nlu-examples
This repository contains examples of custom components for educational purposes.
Stars: ✭ 126 (+320%)
Mutual labels:  rasa-nlu, rasa
FAQ Chatbot Rasa
FAQ's answering chatbot using open source chatbot framework Rasa Stack
Stars: ✭ 33 (+10%)
Mutual labels:  rasa-nlu, rasa-core
rasa-bert-finetune
支持rasa-nlu 的bert finetune
Stars: ✭ 46 (+53.33%)
Mutual labels:  rasa-nlu, rasa
app rasa chat bot
a stateless chat bot to perform natural language queries against the App Store top charts
Stars: ✭ 20 (-33.33%)
Mutual labels:  rasa
Dailyfresh-B2C
这是一个 ☛全栈/全端/全平台☚ 的B2C模式的电商项目, web后台基于Django2.0 + Python3.6, 前后端分离,前端使用Vue框架开发。移动端基于Flutter开发,一套代码支持Android&IOS平台。微信小程序基于mpvue框架开发。
Stars: ✭ 74 (+146.67%)
Mutual labels:  django2
rasa-site-bot
A chatbot that fetches events details from a conference's website
Stars: ✭ 81 (+170%)
Mutual labels:  rasa-nlu
Microsoft.Owin.Security.QQ-WebChat
QQ and Webchat extensions for Microsoft.Owin.Security
Stars: ✭ 20 (-33.33%)
Mutual labels:  webchat
rasa ch faq
用 rasa 实现 rasa demo 机器人,有一些惊奇的功能,faq,图谱,多轮等
Stars: ✭ 156 (+420%)
Mutual labels:  rasa
rasa-chatbot
Sample chatbot with rasa stack
Stars: ✭ 29 (-3.33%)
Mutual labels:  rasa
devops kkit
django2.1写的自动化运维系统
Stars: ✭ 51 (+70%)
Mutual labels:  django2
rasa bot example
This is an example rasa chatbot implementation that can be connected to your Facebook page.
Stars: ✭ 14 (-53.33%)
Mutual labels:  rasa
accountbook server
📔 记账本 Django 后端
Stars: ✭ 20 (-33.33%)
Mutual labels:  django2
bot
Python Bot using RASA for NLP
Stars: ✭ 28 (-6.67%)
Mutual labels:  rasa-nlu
omms
OMMS运维监控系统,功能介绍: 资产管理 应用管理 任务执行 权限管理等
Stars: ✭ 60 (+100%)
Mutual labels:  django2
drf-addons
Some customised Django classes and functions that one can use in DJango. Collected from internet!
Stars: ✭ 20 (-33.33%)
Mutual labels:  django2
Rapid-ChatXChannels
A rapid fire tutorial and introduction of Django Channels. To get more in depth check out the full course https://kirr.co/badl8e
Stars: ✭ 107 (+256.67%)
Mutual labels:  django2
rasa-docker-arm
Rasa Docker image for ARMv7. Runs on a Raspberry Pi.
Stars: ✭ 19 (-36.67%)
Mutual labels:  rasa

Chatbot Models are up to date with the current versions of rasa core & nlu

Usage

Replace the rasachat/models folder with your models folder and run django server and bot.py file seperately

The data used to train the chatbot is very minimal, you should replace the rasachat/models folder or extend and improve the training data by updating rasachat/nlu.nd & rasachat/stories.md files.

Also refer to Django-Rasa-Sockets for more info on implementing Django and Rasa with Sockets.

Django-Rasa-Bot

Integrating Rasa Core with Django backend and finally using Webchat for chatbot user interface

In this project we will be using rasa_core for our chatbot backend django for website backend and rasa-webchat for chatbot User Interface

We have to first create a Rasa SocketIO Channel Layer

Create a separate file for this layer in rasachat folder bot.py

from rasa_core.agent import Agent
from rasa_core.channels.socketio import SocketIOInput
from rasa_core.agent import Agent

# load your trained agent
agent = Agent.load('models/dialogue', interpreter='models/current/nlu')

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=False if you want to keep the server running
s = agent.handle_channels([input_channel], 5500, serve_forever=True)

Above piece of code comes from Rasa docs

Then in your html template configure rasa-webchat with following code

<body>
	<div id="webchat">
		<script src="https://storage.googleapis.com/mrbot-cdn/webchat-latest.js"></script>
		<script>
		    WebChat.default.init({
		        selector: "#webchat",
		        initPayload: "/get_started",
		        interval: 1000, // 1000 ms between each message
		        customData: {"sender": "django"}, // arbitrary custom data. Stay minimal as this will be added to the socket
		        socketUrl: "http://localhost:5500/",
		        title: "Connect",
		        subtitle: "The bot which connects people",
		        profileAvatar: "https://rasa.com/assets/img/demo/rasa_avatar.png",
		        showCloseButton: true,
		        fullScreenMode: false
		    })
		</script>
	</div>
</body>

The socketUrl is the url endpoint that we configured with rasa socketio layer and the profileAvatar is the image that is displayed in bot message

Now run the django server and the socketio server seperately using two terminals,

../Django-Rasa-Bot> python manage.py runserver
# then in another command prompt or terminal run
../Django-Rasa-Bot/rasachat> python bot.py

Now open the url 127.0.0.1:8000 and click on the chat widget placed in bottom right and enter hi there and the bot will reply.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].