Skip to content

Instantly share code, notes, and snippets.

@rgstephens
rgstephens / kapa.py
Created September 5, 2024 22:35
Rasa Custom Information Retriever for Kapa
from typing import TYPE_CHECKING, Any, List, Text, Dict, Optional
from dataclasses import dataclass
import aiohttp
import urllib.parse
import structlog
from rasa.utils.endpoints import EndpointConfig
from rasa.core.information_retrieval import (
SearchResultList,
@rgstephens
rgstephens / scores.py
Created October 21, 2023 15:39
Scores
# Rasa Technologies GmbH
# Copyright 2021 Rasa Technologies GmbH
import argparse
import os
from typing import Text, Any, Dict, Optional, Tuple, Union
import shutil
from subprocess import call, STDOUT
import requests
import logging
import questionary
@rgstephens
rgstephens / docker-compose.yml
Created May 3, 2023 18:03
docker-compose.yml for Rasa Pro
version: "3.4"
services:
rasa-production:
restart: always
# gcloud auth configure-docker europe-west3-docker.pkg.dev
image: "europe-west3-docker.pkg.dev/rasa-releases/rasa-plus/rasa-plus:3.5.6"
volumes:
# - ./.config:/.config
- ./models:/Users/greg/Dev/rasa/moodbot/models:ro
@rgstephens
rgstephens / Dockerfile
Created June 6, 2022 17:31
Rasa 3.0.6 aarch64
# Dockerfile from https://hub.docker.com/r/rasa/rasa-sdk/dockerfile
# Git Repo from https://github.com/RasaHQ/rasa-sdk
#FROM python:3.6-slim
#FROM rasa/rasa-sdk:${RASA_SDK_VERSION}
FROM rasa/rasa-sdk:3.0.6
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Americas/Los_Angeles
COPY actions /app/actions
@rgstephens
rgstephens / env-3.1.0.yml
Created March 31, 2022 05:22
Rasa Apple M1 `env-3.1.0.yml`
channels:
- apple
- conda-forge
dependencies:
- python==3.8.12
- dask==2021.11.2
- tensorflow-deps==2.7.0
- numpy>=1.19.2,<1.20.0
- scipy>=1.7.3,<1.8.0
@rgstephens
rgstephens / 3.0.10_env.yml
Created March 17, 2022 17:48
Conda `env.yml` for Rasa 3.0.10 on Apple M1
channels:
- apple
- conda-forge
dependencies:
- python==3.8.12
- dask==2021.11.2
- tensorflow-deps==2.6.0
- numpy>=1.19.2,<1.20.0
- scipy>=1.4.1,<1.8.0
@rgstephens
rgstephens / rasa_export.ndjson
Last active January 27, 2021 07:55
Kibana Dashboard for Rasa
{"attributes":{"fields":"[{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_
@rgstephens
rgstephens / adlists.list
Last active October 22, 2023 12:29
Pi-Hole /etc/pihole/adlists.list - https://firebog.net/
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://hosts-file.net/grm.txt
https://reddestdream.github.io/Projects/MinimalHosts/etc/MinimalHostsBlocker/minimalhosts
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/KADhosts/hosts
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Spam/hosts
@rgstephens
rgstephens / docker-compose.yml
Last active December 4, 2019 00:12
Docker compose for Rasa X
# endpoints.yml
# action_endpoint:
# url: "http://app:5055/webhook"
version: "3.4"
services:
duckling:
restart: always
image: "rasa/duckling:latest"
ports:
@rgstephens
rgstephens / Dockerfile
Last active January 30, 2020 02:01
rasaPi Dockerfile
FROM debian:buster
RUN echo `date`
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
libbz2-dev \
libssl-dev \
xz-utils \
wget \