GithubHelp home page GithubHelp logo

jpfcabral / botgen Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.29 MB

Python-based open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.

Home Page: https://jpfcabral.github.io/botgen/

Python 100.00%
bot-framework chatbot discord facebook microsoft-bot-framework slack telegram webchat twilio chatapp toolkit botkit teams bot-application discord-bot slack-bot telegram-bot facebook-messenger facebook-messenger-bot

botgen's Introduction

Python-based open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.

This repository is inspired by the javascript library Botkit and the BotFramework SDK concepts.

Adapters

You can connect major plataforms using the same bot core code by setting different adapters. Adapter is a interface between your bot and message plataforms.

Adapter Docs Availability
Web 0.0.1
Telegram
Discord
Slack
Facebook
Twilio (SMS)
Whatsapp

Usage

Installation

pip install botgen

Copy and paste the code below to a file called run.py

# run.py
from botgen import Bot
from botgen import BotMessage
from botgen import BotWorker
from botgen.adapters import WebAdapter

adapter = WebAdapter()
bot = Bot(adapter=adapter)

async def hello(bot_worker: BotWorker, message: BotMessage):
    # Put your "intelligence" here, like LLMs, Decision Trees, etc
    await bot_worker.say("hello from bot")


bot.hears(pattern="hello", event="message", handler=hello)

bot.start()

So you can run the project using:

python run.py

Then start a conversation:

curl -L -X POST 'http://localhost:8080/api/messages' -H 'Content-Type: application/json' -d '{
	"user": "dummy",
    "text": "hello",
    "type": "message"
}'

How to contribute

Feel free to suggest features, help or report bugs by creating issues.

botgen's People

Contributors

jpfcabral avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.