Skip to content

vruksheco/Ekatra-QnA-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Ekatra QnA Telegram Bot! 👋

Version Version License: MIT

A Node.js-based Telegram bot powered by OpenAI that provides simple and inventive answers to your questions.

Demo

Username: @Ektra_OpenAI_Bot

Link: https://t.me/Ektra_OpenAI_Bot

This is an image

Tech Stack

  1. node-telegram-bot-api : It is Node.js module to interact with the official Telegram Bot API.

  2. Airtable : Airtable is an easy-to-use online platform for creating and sharing relational databases. It is a spreadsheet-database hybrid which lets you create powerful databases that can be used to power custom applications. Airtable has two APIs:

  3. Railway : Railway is a platform for deployment where you can set up infrastructure, work with it locally, and then deploy to the cloud.

  4. OpenAI GPT-3 : GPT-3, created by OpenAI, is a machine learning model specialising on language processing. GPT-3 generates new text from an input text. Depending on the input and the precise flavour of GPT-3 applied, the output text will conform to a job like as responding to a question stated in the input or finishing the input with additional information.


Obtain API keys:

A. Creating new bot with BotFather

  1. Send @BotFather a /newbot message
  2. Pick name and username.
  3. Receive a BOT_TOKEN

B. Airtable REST API

  1. Create an account on Airtable.
  2. Go to your account page
  3. Under API heading in Account Overview page, click Generate API key button.

C. OpenAI

  1. Create an account on OpenAI
  2. Go to your account page
  3. Under User heading, go to API keys and click Create new secret Key

Test the bot locally

After getting all the API keys. Follow these steps:

  1. Git clone or download this repository
git clone https://github.com/vruksheco/Ekatra-QnA-Bot.git 

cd Ekatra-QnA-Bot
  1. Install all dependencies
npm install
  1. Rename .env_example file into .env and set
  1. TOKEN to your telegram bot API key
  2. apiKey to your OpenAI key
  3. airtable_api to your Airtable REST API key.
  1. Set up and connect MongoDB environment of your choice
  2. Run
npm start

Deploy the bot on Railway

  1. Create a github repository for the bot.
  2. Sign up or login to your railway.app account
  3. Create a new project and select Deploy from GitHub repo > Configure Github app and link your bot github repository.
  4. Once the project starts deploying, go to variables and add the environment variables.
  5. Create a new service and select Provision Mongo db

Congrats! 🤖🎉

The bot is up and running. (If not - check Railway Deploy logs)

Follow Telegram Bot API for latest updates.

Share your bot on Store Bot

Reference:

  1. GPT-3 Chatbot with Python by John Mannelly

Contributions

If you have any suggestion on how to improve the code create a PR request or faced any issues feel free to contact me.


Author

👤 Ramsha Shaikh


Show your support

Give a ⭐️ if this project helped you!


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages