All Projects → Existencce → Gpt2 Telegram Chatbot

Existencce / Gpt2 Telegram Chatbot

GPT-2 Telegram Chat bot

Programming Languages

python
139335 projects - #7 most used programming language
script
160 projects

Projects that are alternatives of or similar to Gpt2 Telegram Chatbot

GPT2-Telegram-Chatbot
GPT-2 Telegram Chat bot
Stars: ✭ 67 (+63.41%)
Mutual labels:  intelligence, text, machine, prediction, generation
Bottender
⚡️ A framework for building conversational user interfaces.
Stars: ✭ 3,803 (+9175.61%)
Mutual labels:  bot, chatbot, telegram
Dialogflow Web V2
Dialogflow Web Integration. Rich Components, Actions on Google and more
Stars: ✭ 307 (+648.78%)
Mutual labels:  bot, chatbot, chat
Cryptoinscriber
📈 A live cryptocurrency historical trade data blotter. Download live historical trade data from any cryptoexchange, be it for machine learning, backtesting/visualizing trading strategies or for Quantopian/Zipline.
Stars: ✭ 27 (-34.15%)
Mutual labels:  bot, learning, machine
Swiftybot
How to create a Telegram, Facebook Messenger, and Google Assistant bot with Swift using Vapor on Ubuntu / macOS.
Stars: ✭ 247 (+502.44%)
Mutual labels:  bot, google, telegram
technopsyna
телеграм бот для техноконфы
Stars: ✭ 16 (-60.98%)
Mutual labels:  chat, telegram, chatbot
Messenger
Open source, native iOS Messenger, with realtime chat conversations (full offline support).
Stars: ✭ 4,264 (+10300%)
Mutual labels:  chatbot, chat, telegram
Telebot
Write Telegram bots in Rust with Tokio and Futures
Stars: ✭ 179 (+336.59%)
Mutual labels:  bot, chat, telegram
Aws Lex Web Ui
Sample Amazon Lex chat bot web interface
Stars: ✭ 500 (+1119.51%)
Mutual labels:  bot, chatbot, chat
Node Telegram Bot Api
Telegram Bot API for NodeJS
Stars: ✭ 5,782 (+14002.44%)
Mutual labels:  bot, chatbot, telegram
Yoda
Wise and powerful personal assistant, available in your nearest terminal
Stars: ✭ 674 (+1543.9%)
Mutual labels:  chatbot, learning, chat
Python Telegram Bot
We have made you a wrapper you can't refuse
Stars: ✭ 17,209 (+41873.17%)
Mutual labels:  bot, chatbot, telegram
Urban Bot
🤖 The universal chatbot library based on React. Write once, launch Telegram, Facebook, Slack, ... every messenger with chatbots
Stars: ✭ 223 (+443.9%)
Mutual labels:  bot, chatbot, telegram
Venom
Venom is the most complete javascript library for Whatsapp, 100% Open Source.
Stars: ✭ 3,457 (+8331.71%)
Mutual labels:  bot, chatbot, chat
Integrations
Connect your App to Multiple Messaging Channels with the W3C Open standard.
Stars: ✭ 721 (+1658.54%)
Mutual labels:  bot, chatbot, telegram
Groupbutler
This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
Stars: ✭ 399 (+873.17%)
Mutual labels:  bot, chat, telegram
Java Telegram Bot Tutorial
Java Telegram Bot Tutorial. Feel free to submit issue if you found a mistake.
Stars: ✭ 165 (+302.44%)
Mutual labels:  bot, chatbot, telegram
Flottbot
A chatbot framework written in Go. All configurations are made in YAML files, or inside scripts written in your favorite language.
Stars: ✭ 175 (+326.83%)
Mutual labels:  bot, chatbot, telegram
Slacker
Slack Bot Framework
Stars: ✭ 495 (+1107.32%)
Mutual labels:  bot, chatbot, chat
Deepj
A deep learning model for style-specific music generation.
Stars: ✭ 681 (+1560.98%)
Mutual labels:  learning, machine, generation

GPT2-Telegram-Chatbot

A GPT-2 Telegram chatbot that's been relatively tuned for chatting. Feel free to make me PRs and I'll check out your code! The bot isn't 100% accurate all the time (why I coded in a /retry function.)

Since the bot consumes so much memory, I have it programmed in a round-robin sort of mode. Each input will reset a timer on your account ID, once the timer runs down the bot is free for other users to use. You will be notified when the timer runs down, and other users can see how much time is left and if the bot is in use.

Installation/How to use:

  1. Install python3 and python3-pip from apt or python3 website.

  2. Install tensorflow or tensorflow-gpu using pip.

python3 -m pip install tensorflow

or

python3 -m pip install tensorflow-gpu

Tip: I doubt a regular user would have a GPU that could fit the most recent database into memory. I don't use GPU computing personally. The bot requires a good chunk of memory for CPU processing. (I use 16 GB, it often takes 14G of free memory loaded.)

...

  1. Install requirements.txt

python3 -m pip install -r requirements.txt

  1. Download model.

python3 download_model.py 1558M

  1. Input your telegram botfather bot key in place of BOTKEYBOTKEYBOTKEYBOTKEYBOTKEY in the src/GPT2-Learning.py file near the bottom. You can get this on Telegram from the @botfather account.

  2. Run:

./start

For quick command reference:

start - Basic start command.
help - Show quick help command.
chatbot - Chatbot mode, me+you string edit and open-ended questions.
finish - Default finish sentence command counting words as output length.
learnon - Turn on sentence compilation with Me+you string for conversation.
learnoff - Turn off the sentence compilation.
learnreset - Reset the learned conversation.
retry - Retry the current computation.

Here's a sample in learning chatbot mode with the latest gpt-2 database and top_p set to 0.83:

Me: Hello! How are you today? Are you feeling alright? I hope you are doing well and not getting into any trouble. 
Bot: Yeah, I'm fine. Do you want to make something to eat? 
Me: I already made some food, but thanks! I had some jalapeno poppers. I made a ton of them last night after I sold a lawnmower to some folks I got for free earlier in the day. So what are your plans for the day? 
Bot: Nothing special. Nothing exciting in particular. I just wanna chill out for a bit.  
Me: Just a typical day of kicking back and relaxing huh? Are you gonna watch cartoons or any movies in particular? 
Bot: If it's not sports I'll probably just watch something on the TV.  
Me: Sounds alright. I coded on my chatbot project most of the morning. Was waiting on someone to come buy a projector but they haven't shown up yet unfortunately. What do you do for work if you don't mind me asking? 
Bot: I'm a web developer and engineer. It's fun.   
Me: Cool! I'm also a coder and an ethical hacker. I mostly know how to code in Python but I've been unemployed for some time now after my spine injury. I wish I could have joined the military when I was younger. Were you ever in the military? 
Bot: No. I'm not really too proud of my military career. It ended up taking a huge toll on my back.   
Me: What happened to your back if you don't mind me asking?
Bot: First of all, it's better than before. 
Me: Well that's good to hear. Did you injure your back in the military or doing something else? 
Bot: Nope. It's an old injury. 
Me: Ah I see- Well I'll talk to you later. Sorry about your back! I hope we can catch up tomorrow! 
Bot: Yes, of course. Thanks again for chatting!

Example of learning mode backend:

INFO:tensorflow:Restoring parameters from models/1558M/model.ckpt
2020-05-10 14:19:43,794 - tensorflow - INFO - Restoring parameters from models/1558M/model.ckpt
==========
Before splitlines:  Nothing special. Nothing exciting in particular. I just wanna chill out for a bit. You: I'll try to keep my spirits up. Just keep in mind that today's the 10th anniversary of the citywide strike
==========
==========
Mode: True
Learn: True
Length: 44
==========
Before regex:  Nothing special. Nothing exciting in particular. I just wanna chill out for a bit. You: I'll try to keep my spirits up. Just keep in mind that today's the 10th anniversary of the citywide strike
==========
Output:  Nothing special. Nothing exciting in particular. I just wanna chill out for a bit.
==========
Raw_text or Original: You: Hello! How are you today? Are you feeling alright? I hope you are doing well and not getting into any trouble. Me: Yeah, I'm fine. Do you want to make something to eat? You: I already made some food, but thanks! I had some jalapeno poppers. I made a ton of them last night after I sold a lawnmower to some folks I got for free earlier in the day. So what are your plans for the day? Me:
==========
Learning text or Next: You: Hello! How are you today? Are you feeling alright? I hope you are doing well and not getting into any trouble. Me: Yeah, I'm fine. Do you want to make something to eat? You: I already made some food, but thanks! I had some jalapeno poppers. I made a ton of them last night after I sold a lawnmower to some folks I got for free earlier in the day. So what are your plans for the day? Me: Nothing special. Nothing exciting in particular. I just wanna chill out for a bit.
==========
top_p out: 0.8338636363636364
==========
top_p in: 0.83
==========

For a list of grammarly scores please see /SCORES.MD.

Tip:

0.77 top_p can sound emotional, confused and copycat-ish.

0.66 top_p can sound thought-out and literal but can have ascii and cut-off errors.

Inspired by the book When HARLIE Was One by David Gerrold

Inspired by ELIZA

HitCount

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].