{"id":20455337,"url":"https://github.com/alexmhack/django-rasa-sockets","last_synced_at":"2025-04-13T03:35:58.130Z","repository":{"id":39721448,"uuid":"158381259","full_name":"Alexmhack/Django-Rasa-Sockets","owner":"Alexmhack","description":"Rasa Chatbot using Django backend and Sockets for communication","archived":false,"fork":false,"pushed_at":"2022-12-08T06:09:15.000Z","size":2928,"stargazers_count":12,"open_issues_count":14,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T05:03:28.837Z","etag":null,"topics":["browserify","chatbot","django-backend","django-rasa-sockets","django2","rasa","rasa-chatbot","socket","socket-io"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alexmhack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-20T11:47:16.000Z","updated_at":"2023-08-27T01:35:45.000Z","dependencies_parsed_at":"2022-09-20T09:25:46.080Z","dependency_job_id":null,"html_url":"https://github.com/Alexmhack/Django-Rasa-Sockets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexmhack%2FDjango-Rasa-Sockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexmhack%2FDjango-Rasa-Sockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexmhack%2FDjango-Rasa-Sockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexmhack%2FDjango-Rasa-Sockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alexmhack","download_url":"https://codeload.github.com/Alexmhack/Django-Rasa-Sockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660032,"owners_count":21141228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browserify","chatbot","django-backend","django-rasa-sockets","django2","rasa","rasa-chatbot","socket","socket-io"],"created_at":"2024-11-15T11:18:35.664Z","updated_at":"2025-04-13T03:35:58.105Z","avatar_url":"https://github.com/Alexmhack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**NOTE: Currently not working. This repo is currently under development, open issue for any question.**\n\n# Django-Rasa-Sockets\nRasa Chatbot using Django backend and Sockets for communication\n\n**Assuming you have a starter django project with static and templates folder configured with django and a root index view rendering ```index.html``` file from templates folder**\n\n**A basic rasa core and rasa nlu made chatbot with socket.io setup is inside rasachat folder of the repo**\n\n**Steps to setup socket.io**\n\n1. Install NodeJS from official [site](https://nodejs.org/en/).\n\n2. Inside root folder run command\n\t```\n\tnpm init\n\t```\n\tYou will be asked to enter details for the project, you can enter whatever you want.\n\tThis command will create a ```package.json``` file.\n\n3. Install [socket.io](https://www.npmjs.com/package/socket.io) using npm\n\t```\n\tnpm install --save socket.io\n\t```\n\n4. Install [browserify](http://browserify.org/#install) using npm globally\n\t```\n\tnpm install -g browserify\n\t```\n\n5. Now in **static/js** folder, create two files, one for backend javascript code and\n\tanother for frontend which will be created by browserify\n\n\t```\n\tchat.js \t-\u003e backend written by us\n\tbundle.js \t-\u003e frontend compiled by browserify\n\t```\n\n6. When you have your backend javascript code ready with socket.io setup run browserify\n\tcommand to compile file for frontend\n\n\t```\n\tcd static/js\n\tbrowserify chat.js -o bundle.js\n\t```\n\n7. In **templates/index.html** file load static and add script tag for browserify\n\tcompiled ```bundle.js``` file\n\n\t```\n\t\u003cscript src=\"{% static 'js/bundle.js' %}\" type=\"text/javascript\" charset=\"utf-8\"\u003e\u003c/script\u003e\n\t```\n\tYou can reuse the javascript code from the repo\n\n8. Run the django server from root folder\n\t```\n\tpython manage.py runserver\n\t```\n\n\tRun the rasa core server from rasachat folder\n\t```\n\tcd rasachat\n\tpython bot.py \t-\u003e python script for rasa socket server\n\t# or you can run using run script\n\tpython -m rasa_core.run -d models/dialogue -u models/current/nlu --port 5500 --credentials credentials.yml \t\t-\u003e Using run script\n\t```\n\tinteract with chatbot using sockets and django.\n\n# Usage\n```\ngit clone https://github.com/Alexmhack/Django-Rasa-Sockets\n```\n\nReplace the **rasachat** folder with your rasa core chatbot and follow the **\n8th step**\n\nLocate to [127.0.0.1:8000/](http://127.0.0.1:8000/) and click on button at\nbottom right and enter ```hey``` in the input.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmhack%2Fdjango-rasa-sockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexmhack%2Fdjango-rasa-sockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmhack%2Fdjango-rasa-sockets/lists"}