- create a
custom_channelsnamed directory in your project's root - Add
custom_rest.pyinside that directory. - Setup
credentials.yml - After adding
custom_rest.pyyour project will look as following
MyChatbot
├───actions| import pygame | |
| import random | |
| # Initialize pygame | |
| pygame.init() | |
| # Game Constants | |
| WIDTH, HEIGHT = 800, 1000 | |
| WHITE = (255, 255, 255) | |
| PLAYER_BASE_SPEED = 6 # Initial player speed |
| import pygame | |
| pygame.init() | |
| # Game Constants | |
| WIDTH, HEIGHT = 800, 1000 | |
| WHITE = (255, 255, 255) | |
| PLAYER_BASE_SPEED = 6 # Initial player speed | |
| ENEMY_BASE_SPEED_MIN = 4 # Initial min speed for enemies | |
| ENEMY_BASE_SPEED_MAX = 8 # Initial max speed for enemies |
| 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: |
| 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 |
| 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": [ |
| 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 |
| <?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" |