GPT-2 fediverse bot
Go to file
emilis af00fc5c4b Fixed panic for block_on by using smol, this feels wrong 2021-09-01 23:06:46 +02:00
src Fixed panic for block_on by using smol, this feels wrong 2021-09-01 23:06:46 +02:00
.gitignore Finished implementing TelegramSelector 2021-07-05 18:39:09 -07:00
Cargo.lock Fixed panic for block_on by using smol, this feels wrong 2021-09-01 23:06:46 +02:00
Cargo.toml Fixed panic for block_on by using smol, this feels wrong 2021-09-01 23:06:46 +02:00
README.md Improved readme 2021-09-01 19:49:57 +02:00

README.md

izzilis gpt-2 bot

Meant to be used with a finetuned GPT-2 model

Usage

To run the bot, you need a valid bot_config.json file at the path where you're running the bot. If you do not have one, izzilis will generate a default one for you to fill out.

This bot currently requires a Telegram bot token to work, as there is no option to disable curation. To create a bot, please use the Botfather. Once created, and running, set a channel for the bot to post curation options in via the /setmain bot command. Usually this requires sending /setmain@bot_username to the chat with the bot (can be group chats).

This default uses the Misskey publisher. If you want to publish to Mastodon, Pleroma, or any other mastodon-compatible API, please replace Misskey in the publisher object with Mastodon.

Config values

Name Value
python_path The path to the system's python3 interpreter
model_name The name of the GPT-2 model to use (see gpt-2 docs)
temperature The temperature value to call gpt-2 with (see gpt-2 docs)
top_k The top_k value to call gpt-2 with (see gpt-2 docs)
gpt_code_path The path to where the gpt-2 source & models are located
interval_seconds See interval_seconds
bot_token Telegram Bot API token
chat_ref The chat reference ID for the telegram bot, leave at 0, will be filled once /setmain is sent
post_buffer How many curated samples the bot will hold at maximum at a time
publisher See publisher

interval_seconds

Name Value
min Minimum amount of seconds to wait between posts
max Maximum amount of seconds to wait between posts

publisher

The publisher can currently hold one of two JSON objects, named either Mastodon or Misskey, which determines which posting API it will use. Whether the object is Misskey or Mastodon, it has the following members:

Name Value
base_url The base URL of the instance
token The auth token for the account, leave empty for Mastodon as you will be prompted to log in and authorize

An example Misskey publisher entry looks like this:

	"publisher": {
		"Misskey": {
			"base_url": "",
			"token": ""
		}
	}