Franklin is a ChatGPT backed IRC bot
Setup
-
Install Irssi and the perl interpreter from your system's package manager.
-
Get it on GitHub
-
You should configure
franklin.pl
to autoload on irssi start, and optionally configure your channel autojoins. -
Create an API key, then run
/set franklin_api_key [api key]
. -
You'll need to create a block.lst file, and point franklin towards it with
/set franklin_block_file [filename]
. -
You’ll need to set up a webserver with a directory under it’s root called
said
(usually something like/var/www/html/said/
), that is writable by the franklin.pl script. Franklin should set the umask correctly for the files automatically. -
Edit any variables in
franklin.pl
you need to, but most settings can be changed with the/set franklin...
command. -
Finally, test it by calling
Franklin: hey buddy, send me a test message so I know that you are working.
Options
-
/set franklin_response_webserver_addr [address]
This is the webserver address where responses should be stored on the website. -
/set franklin_http_location [dir]
This is the dir location of where the responses are stored on the drive. -
/set franklin_hard_limit [int]
This is a hard limit of characters for the IRC. -
/set franklin_word_limit [int]
This is a soft word limit for ChatGPT. -
/set franklin_chatterbox_mode [int]
This is how often Franklin will talk by itself when on chatterbox mode. 1 is barely at all, 1000 is every line it says something (only go up to 950 or so) -
/set franklin_history_length [int]
How many messages back Franklin's history buffer goes for context. -
/set franklin_blocklist_file [file]
Add users that cannot use Franklin to this filename and set it here. -
/set franklin_server_info [str]
Some information on the servers Franklin is connected to. -
/set franklin_asshat_threshold [int]
How much of an asshole someone has to be before Franklin kicks if Franklin happens to have hops or ops. Usually around 7 or 8. -
/set franklin_google_gtag [G-tag]
The Gtag for your google analytics should go here. -
/set franklin_txid_chans [#chan1 #chan2]
This is a list of channels that the TXID should appear appended to the end of Franklin's message in.
Debugging
… Test the bot by calling it with “Franklin: print me a test message” in channel (do this from a different nick,
not Franklin’s nick!)
You may have errors that franklin can't read from or write to something, check your permissions! (I set ownership to franklin:staff).
If text is to long, try using /set franklin_hard_limit to decrease the maximum number of characters on the line.
After edits you can just do /script load franklin
to reload the bot without restarting irssi. Any user may also reload Franklin
by typing "Franklin: reload" in channel with the bot, if the franklin_helper.pl module is loaded.