A Telegram bot that asks you a question and evaluate the response you provide.

Overview

PiSquared

A Telegram bot that asks you a question and evaluate the response you provide.

Thanks to the labse_bert model, the evaluation of the answer is multilingual, so you can write the answer in your language and it will be checked correctly.

Bot question example

Download of model

In this repository there are some precompiled versions of the hugging face importer tool provided by spaGO, you can compile it using the instructions of original repository. The total folder size will be around 5GB, but you can delete the pytorch_model.bin file to save 1.8GB with no problem.

Download model using Windows

cd folderOfPiSquared
hf-importer-win64 --repo=models --model=pvl/labse_bert

Download model using Linux

cd folderOfPiSquared
hf-importer-linux64 --repo=models --model=pvl/labse_bert

Issues with Windows 11

I tested it using Windows and spago says that the OS doesn't support read only files. I didn't find the solution so if you know how to resolve it, please open an issue.

Configuration

Rename .env.example to .env

Fill the required fields:

  • BOT_TOKEN is the Telegram token obtained by BotFather
  • QUESTIONS_FILE is the file that contains the questions and the answers for each subject
  • SQLITE_DB is the SQLITE database file, and can be a path to a file or file::memory:?cache=shared for a temporary in memory database
  • MODEL_FOLDER is the folder that contains the NPL model to check the answers

Build this bot

Download Go compiler using a package manager (apt, snap, ecc) or from the Go website. Then use this command in the project folder to compile without debug symbols and save space:

go build -ldflags "-s -w"

An executable file will be built and the settings are in the .env file.

Thanks

  • SpaGO, the ML/NPL library that processes the user answer
  • Gophercon SpaGO examples, that provides some useful examples to use SpaGO
  • Telebot, a bot framework that this project use to connect with Telegram
  • Gorm, an ORM that abstracts SQL queries using Go data types
You might also like...
IRC, Slack, Telegram and RocketChat bot written in go
IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Bot that polls activity API for Github organisation and pushes updates to Telegram.

git-telegram-bot Telegram bot for notifying org events Requirements (for building) Go version 1.16.x Setup If you don't have a telegram bot token yet,

Library for working with golang telegram client + bot based on tdlib. This library was taken from the user Arman92 and changed for the current version of tdlib.

go-tdlib Golang Telegram TdLib JSON bindings Install To install, you need to run inside a docker container (it is given below) go get -u github.com/ka

A tip bot and Lightning wallet on Telegram ⚡️
A tip bot and Lightning wallet on Telegram ⚡️

@LightningTipBot 🏅 A Telegram Lightning ⚡️ Bitcoin wallet and tip bot for group chats. This repository contains everything you need to set up and run

Telegram bot for distorting images and stickers using CAS
Telegram bot for distorting images and stickers using CAS

Distortioner Telegram bot for distorting pictures, stickers, voice messages and GIFs using Content Aware Scale. Currently resides here: @distortionerb

Telegram bot check your TrainingPeaks profile workouts and send notification if some workouts added or changed

TrainingPeaks Bot Telegram bot check your TrainingPeaks profile workouts and sen

UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot
UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot Easy way to get QR and U-code using Utopia API in telegram bot Us

go telegram bot, used for video collect and more.

For what 我的想法: 部署一个私有的tg api server到国外的vps 通过 sshfs(sftp) 挂载我国内的nas到vps上 在tg上转发视频到我的bot 通过此程序handle此转发 透过私有api server会下载视频到我的vps上 将视频移动到挂载目录,自动同步到我的na

Owner
Erik Pellizzon
Italian student and self-taught developer.
Erik Pellizzon
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

TechProber 1 Jan 24, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

FTC Team 8 Dec 16, 2021
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

null 9 Jun 28, 2022
A Telegram Repo For Bots Under Maintenance Which Gives Faster Response To Users

Maintenance Bot A Telegram Repo For Bots Under Maintenance Which Gives Faster Response To Users Requests » Report a Bug | Request Feature Table of Con

HEIMAN PICTURES 9 Mar 21, 2022
Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Disgo 2 Sep 9, 2022
RaspChecker - A Telegram bot that allows you to monitor your Raspberry Pi's temperature and shut it down. Written in Golang.

RaspChecker Remotely monitor your Raspberry Pi's temperature and shut it down if you want. All through Telegram. How to set up In order to run the bot

Drull 0 Jan 2, 2022
This repository will guide you to steal whatever the user copies and send content to telegram bot.

copy-clipboard-stealer-with-telegram This repository will guide you to steal whatever the user copies and send content to telegram bot. Setting Envior

Jhangju 2 Oct 4, 2022
A Telegram bot that will run code for you.

piston_bot A Telegram bot that will run code for you. Made using piston. Available as @iruncode_bot on telegram. Examples Basic example Input: /run py

Tushar Sadhwani 30 Sep 11, 2022
A Telegram bot that feeds you every hour with the latest news about Hacking, FOSS, privacy, security, etc

HackerNews Telegram bot - Golang version A Telegram bot that serves you with personalized HackerNews articles. You can self host it and make it filter

Drull 0 Feb 1, 2022
The serverless OTP telegram service use telegram as OTP service, and send OTP through webhook

Setup OTP First thing, you need prepare API(webhook) with POST method, the payload format as below { "first_name": "Nolan", "last_name": "Nguyen",

Dong Nguyen 3 Jul 24, 2022