Skip to content
discord bot, but its gpt-2
Python Shell
Branch: master
Clone or download
Pull request Compare This branch is 15 commits ahead, 2 commits behind itsmehemant123:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
download_model.sh
gpt-chatbot-client.py
gpt2_server_sessions.py
gptchatbot.py
requirements.txt

README.md

GPT-2 Discord Bot

Setup

  • Install dependencies with:
pip install -r requirements.txt
  • Run the script download_model.sh by:
sh download_model.sh 117M

This should download the gpt-2 model. 117M is the smallest model, 345M is a larger variant.

  • Create config folder

  • Create servers folder in config folder

  • Create auth.json, and place it inside the config folder. Its content should be:

{
   "token": "<your_token>",
   "client_id": "<client_id>"
}

How to run

  • Run the script with:
python3 gpt-chatbot-client.py
  • use it!
!talk Complete this sentence
!talk (No text here to generate unconditional sample)

Commands/Settings

Each server gets its own Tensorflow session with its own model. This gives every server the opportunity to use it's own GPT-2 model.
The !setconfig command sets the neccessary parameters!
Only user with message managing permissions on the respective servers can user the following commands:

!setconfig <nsamples> <length> <temperature> <topk> <model: 117M or 345M>
!getconfig
!default

!default resets the settings for the server to the default settings nsamples=1, length=200, temperature=1, top_k=0, model=117M

Improvements

  • Enable finetuning.
You can’t perform that action at this time.