Shirt Bot is a discord bot which uses GPT-3 to generate text

Overview

SHIRT BOT · License: Unlicense Language: Python 3

Shirt Bot is a discord bot which uses GPT-3 to generate text.
Made by Cyclcrclicly#3420 (474183744685604865) on Discord.
Support Server

EXAMPLES

example1 example2 example3 example4 example5 example6

HELP

COMMAND HELP

ARGUMENT EXPLANATION

            required argument
[argument]            optional argument
[argument=default]    optional argument with a default value
The order of optional arguments matters.

COMMAND ARGUMENTS

max_size      the maximum size in tokens (word segments)
randomness    how random the output message will be as a percentage
chance        how likely the bot is to trigger as a percentage
text          extra text
channel       the channel which the command will affect

COMMANDS

generate [max_size=80] [randomness=45] [text]
  Generates text.
  
trigger [max_size=80] [randomness=45] [text]
  Generates text with the last 15 non-command messages as context.

shirttalk
  In a server    lists shirt talk channels
  In a DM        states if shirt talk is on in the DM channel
shirttalk set [randomness=45] [channel=message channel]
  Sets up a shirt talk channel.
shirttalk unset [channel=message channel]
  Removes a shirt talk channel.

shirtreply
  In a server    lists shirt reply channels
  In a DM        states if shirt reply is on in the DM channel
shirtreply set [randomness=45] [channel=message channel]
  Sets up a shirt reply channel.
shirtreply unset [channel=message channel]
  Removes a shirt reply channel.

shirtrandom
  In a server    lists shirt random channels
  In a DM        states if shirt random is on in the DM channel
shirtrandom set [randomness=45] [chance=5] [channel=message channel]
  Sets up a shirt random channel.
shirtreply unset [channel=message channel]
  Removes a shirt random channel.

reset
  Once the bot encounters this command, it stops collecting further messages as context.

echo 
  Repeats text.

links
  In a server    lists all channels with uncensored links
  In a DM        states if DM channel has (un)censored links
links toggle [channel=message channel]
  Toggles censoring links in a channel.

SHIRT TALK HELP

Shirt talk is a feature of Shirt Bot which lets it automatically reply to all messages sent in a channel.
By default, it's off for all channels, but you can set it up using the shirttalk set command.
The extras that work in shirt talk channels are '#', '# ', and '$ '.
Shirt talk also works in DMs.

SHIRT REPLY HELP

Shirt reply is a feature of Shirt Bot which lets it trigger when you reply to one of the bot's messages.
By default, it's off for all channels, but you can set it up using the shirtreply set command.
The extras which work in shirt reply channels are '#' and '$ '.
Shirt reply also works in DMs.

SHIRT RANDOM HELP

Shirt random is a feature of Shirt Bot which lets it trigger randomly (customizable chance) whenever a message is sent in a channel where it's on.
By default, it's off for all channels, but you can set it up using the shirtman set command.
Extras don't work here.
Shirt random also works in DMs.

PRECEDENCE

Precedence is a way to organize the bot's features into a hierarchy. If a feature is on/triggered, it prevents some other features from triggering.
The precedence is:

  Commands
    if your message is a command, it prevents everything below from triggering

  Shirt talk
    if your message is in a shirt talk channel, it prevents everything below from triggering
    if none of the above features are on/triggered, shirt talk can trigger

  Shirt reply
    if your message replies to shirt bot in a shirt reply channel, it prevents everything below from triggering
    if none of the above features are on/triggered, shirt reply can trigger

  Shirt random
    if none of the above features are on/triggered, shirt random can trigger

EXTRAS

Extras are extra features of Shirt Bot which work in shirt talk and shirt reply. The helps for those list exactly which extras work.
Extras are:

  '#'     if your message only contains '#', Shirt Bot will try to delete the message (unless in a DM) and trigger. This allows you to trigger the bot multiple times without having to type any new messages in between.

  '# '    if your message starts with '# ', Shirt Bot will ignore the message (i.e. won't trigger), but will actually collect the message once an actual trigger occurs. This allows you to type multiple messages before triggering the bot if you wish to do that.

  '$ '    if your message starts with '$ ', it will force Shirt Bot to start its next message with the content of your message. This way, you can force Shirt Bot to say something it otherwise may not have said.

REQUIREMENTS

python - at least 3.6
regex
aiohttp
discord.py - at least 1.6.0

INSTRUCTIONS

  1. Download the source code, put it into a folder, and navigate to the folder.
  2. Install all requirements. You can use pip install -r requirements.txt or install them manually.
  3. Create a config.json file from the config.json.template file and fill it out with the correct information.
  4. Run shirt_bot.py.

CREDIT

All the contents of the encoder folder are from https://github.com/latitudegames/GPT-3-Encoder and are thus licensed with the MIT License.
URL matching regex pattern is from: https://stackoverflow.com/a/17773849

You might also like...
Galois is an auto code completer for code editors (or any text editor) based on OpenAI GPT-2.
Galois is an auto code completer for code editors (or any text editor) based on OpenAI GPT-2.

Galois is an auto code completer for code editors (or any text editor) based on OpenAI GPT-2. It is trained (finetuned) on a curated list of approximately 45K Python (~470MB) files gathered from the Github. Currently, it just works properly on Python but not bad at other languages (thanks to GPT-2's power).

glow-speak is a fast, local, neural text to speech system that uses eSpeak-ng as a text/phoneme front-end.

Glow-Speak glow-speak is a fast, local, neural text to speech system that uses eSpeak-ng as a text/phoneme front-end. Installation git clone https://g

Bot to connect a real Telegram user, simulating responses with OpenAI's davinci GPT-3 model.

AI-BOT Bot to connect a real Telegram user, simulating responses with OpenAI's davinci GPT-3 model.

Interactive Jupyter Notebook Environment for using the GPT-3 Instruct API

gpt3-instruct-sandbox Interactive Jupyter Notebook Environment for using the GPT-3 Instruct API Description This project updates an existing GPT-3 san

An implementation of model parallel GPT-3-like models on GPUs, based on the DeepSpeed library. Designed to be able to train models in the hundreds of billions of parameters or larger.

GPT-NeoX An implementation of model parallel GPT-3-like models on GPUs, based on the DeepSpeed library. Designed to be able to train models in the hun

🛸 Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy

spacy-transformers: Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy This package provides spaCy components and architectures to use tr

🛸 Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy

spacy-transformers: Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy This package provides spaCy components and architectures to use tr

Guide: Finetune GPT2-XL (1.5 Billion Parameters) and GPT-NEO (2.7 B) on a single 16 GB VRAM V100 Google Cloud instance with Huggingface Transformers using DeepSpeed

Guide: Finetune GPT2-XL (1.5 Billion Parameters) and GPT-NEO (2.7 Billion Parameters) on a single 16 GB VRAM V100 Google Cloud instance with Huggingfa

Transformer related optimization, including BERT, GPT
Transformer related optimization, including BERT, GPT

This repository provides a script and recipe to run the highly optimized transformer-based encoder and decoder component, and it is tested and maintained by NVIDIA.

Comments
  • Merge clean_unused_channels_change

    Merge clean_unused_channels_change

    Made cleanup_unused_channels a coroutine. cleanup_unused_channels used to be a task, but I suspect it may have caused issues with data writes sometimes getting stuck. It is now a coroutine that runs inside of the update_data_channels task.

    opened by Cyclcrclicly 0
Owner
null
Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingwai

TextCortex - HemingwAI Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingw

TextCortex AI 27 Nov 28, 2022
A python project made to generate code using either OpenAI's codex or GPT-J (Although not as good as codex)

CodeJ A python project made to generate code using either OpenAI's codex or GPT-J (Although not as good as codex) Install requirements pip install -r

TheProtagonist 1 Dec 6, 2021
Honor's thesis project analyzing whether the GPT-2 model can more effectively generate free-verse or structured poetry.

gpt2-poetry The following code is for my senior honor's thesis project, under the guidance of Dr. Keith Holyoak at the University of California, Los A

Ashley Kim 2 Jan 9, 2022
Host your own GPT-3 Discord bot

GPT3 Discord Bot Host your own GPT-3 Discord bot i'd host and make the bot invitable myself, however GPT3 terms of service prohibit public use of GPT3

[something hillarious here] 8 Jan 7, 2023
Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts

gpt-2-simple A simple Python package that wraps existing model fine-tuning and generation scripts for OpenAI's GPT-2 text generation model (specifical

Max Woolf 3.1k Jan 7, 2023
Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts

gpt-2-simple A simple Python package that wraps existing model fine-tuning and generation scripts for OpenAI's GPT-2 text generation model (specifical

Max Woolf 2.5k Feb 17, 2021
Simple Text-Generator with OpenAI gpt-2 Pytorch Implementation

GPT2-Pytorch with Text-Generator Better Language Models and Their Implications Our model, called GPT-2 (a successor to GPT), was trained simply to pre

Tae-Hwan Jung 775 Jan 8, 2023
Neural text generators like the GPT models promise a general-purpose means of manipulating texts.

Boolean Prompting for Neural Text Generators Neural text generators like the GPT models promise a general-purpose means of manipulating texts. These m

Jeffrey M. Binder 20 Jan 9, 2023
This repository serves as a place to document a toy attempt on how to create a generative text model in Catalan, based on GPT-2

GPT-2 Catalan playground and scripts to train a GPT-2 model either from scrath or from another pretrained model.

Laura 1 Jan 28, 2022