Skip to content

Instantly share code, notes, and snippets.

View nirajch's full-sized avatar

Niraj Chaurasia nirajch

View GitHub Profile
@nirajch
nirajch / MSTeamsHelper.py
Created September 9, 2021 03:04
MS Teams Helper to get user email address and inject messages to the conversation with Rasa bot. The inputs are dependent on Rasa Custom Botframework Connector: https://gist.github.com/nirajch/788a73c65a00bc575666671f83ef9827
import os
import logging
from typing import Dict, Text, Any, List, Union, Optional
from rasa_sdk import Action, Tracker]
import ruamel.yaml
import requests
import json
import datetime
@nirajch
nirajch / RasaHumanHandoffPolicy.py
Last active August 18, 2023 05:13
Rasa Custom Human Handoff Policy (Not a complete solution)
import json
import logging
import os
from typing import Any, List, Text, Optional, Dict, Tuple
from rasa.core.actions.action import ACTION_LISTEN_NAME
import rasa.utils.io
from rasa.core import utils
@nirajch
nirajch / botframework.py
Created August 23, 2021 20:58
Rasa Custom Botframework connector with bot typing and additional details
import datetime
import json
import logging
import requests
from sanic import Blueprint, response
from sanic.request import Request
from typing import Text, Dict, Any, List, Iterable, Callable, Awaitable, Optional
from rasa.core.channels.channel import UserMessage, OutputChannel, InputChannel
from sanic.response import HTTPResponse
#Resume Phrase Matcher code
#importing all required libraries
import PyPDF2
import os
from os import listdir
from os.path import isfile, join
from io import StringIO