Skip to content

Instantly share code, notes, and snippets.

View Horizon733's full-sized avatar
🏠
Working from home

Dishant Gandhi Horizon733

🏠
Working from home
View GitHub Profile
@Horizon733
Horizon733 / actions.py
Created April 9, 2022 06:23
Rasa Fallback tutorial
from rasa_sdk import Tracker, Action
from typing import Any, Text
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.types import DomainDict
# DO NOT copy paste whole file
class ActionFallback(Action):
def name(self) -> Text:
@Horizon733
Horizon733 / Readme.md
Created November 29, 2021 06:40
Android Rasa Channel

Android custom channel for Rasa

Add custom channel code

  • create a custom_channels named directory in your project's root
  • Add custom_rest.py inside that directory.
  • Setup credentials.yml
  • After adding custom_rest.py your project will look as following
MyChatbot
├───actions
@Horizon733
Horizon733 / Dockerfile
Last active November 10, 2022 14:38
Simple and easy Dockerfiile and docker-compose file for deploying rasa chatbot on any cloud platform
FROM python:3.7.7-stretch AS BASE
RUN apt-get update \
&& apt-get --assume-yes --no-install-recommends install \
build-essential \
curl \
git \
jq \
libgomp1 \
vim
@Horizon733
Horizon733 / actions.py
Last active August 29, 2023 13:57
How to add Carousels on Rasa-webchat by Botfront
class ActionCarousel(Action):
def name(self) -> Text:
return "action_carousels"
def run(self, dispatcher, tracker: Tracker, domain: "DomainDict") -> List[Dict[Text, Any]]:
message = {
"type": "template",
"payload": {
"template_type": "generic",
"elements": [
@Horizon733
Horizon733 / MainActivity.kt
Last active October 18, 2020 18:29
MainActivity for covid chatbot app. Made with love for Medium Tutorial!
package com.example.covidapp
import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.*
import androidx.appcompat.app.AppCompatActivity
@Horizon733
Horizon733 / bot_response_box.xml
Last active March 9, 2022 04:34
Bot response chatbox for covid chatbot app
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="4dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"