oxagast / Franklin

Franklin is a LLM powered AI IRC chat bot
https://franklin.oxasploits.com
Other
10 stars 5 forks source link
artificial-intelligence bot chatbot chatbot-platform chatgpt cohere cohere-ai command gpt gpt-3-5-turbo irc irc-bot irc-bot-framework irssi large-language-models llm llm-prompting prompt-engineering

Franklin

Logo

Franklin is a ChatGPT backed IRC bot

Examples

This is a log from #GPT3, Franklin's unoffcial but defaco channel.

oxagast: Franklin: hello good sir
Franklin: Hello oxagast! How can I help you today? Please let me know if I can assist with any tasks or provide information on any topic you'd like to discuss. Feel free to ask me questions or prompt me with writing tasks. I'll do my best to be of use! TXID:c16b33c8
zyme: Franklin: What do you know about Prompting DALL-E 3, anything?
Franklin: DALL-E is a research project developed by the company OpenAI, known for its successful bid in the AI language model chatbot race. DALL-E stands for "DAVE AI, Large Language Model, Engagement." It is a text-to-image generation model that takes natural language input and generates images that are intended to match the de TXID:052b4be0
oxagast: Franklin: what are those pet electronic devices you could get, neutuer and watch grow on the little screen in the 90s called? Franklin: It sounds like you're referring to the Tamagotchi. They were small, egg-shaped devices with a pixelated screen, released in the 1990s. Users could raise a virtual pet on the device and perform activities like feeding, cleaning, and playing games. TXID:76c7edfc
oxagast: Franklin: when was that first sold?
Franklin: The Tamagotchi was first sold in Japan in November 1996 and quickly gained popularity worldwide. They became a global phenomenon, with multiple generations of the device released, featuring different shapes, colors, and characters. TXID:dcbdcc6c
aestetix: from this https://old.reddit.com/r/PoliticalCompassMemes/comments/1beilus/anon_likes_to_troll/
aestetix: I recently found this subredit, it's fucking hilarious
oxagast> Franklin: what is aestetix talking about in #0xa28?
Franklin: aestetix is referencing a post from the subreddit PoliticalCompassMemes. They find this subreddit hilarious and shared a specific post from it with the chat. TXID:d134552e
oxagast: Franklin: what are the lyrics to 'never gonna give you up'?
Franklin: The lyrics to "Never Gonna Give You Up" by Rick Astley are as follows: [Verse 1] We've known each other for so long Your heart's been aching, but you're too shy to say it Inside, we both know what's been going on We know the game and we're gonna play it [Chorus] I'm never gonna give you up I'm never gonna let you dow TXID:3620b242
oxagast: Franklin: continue 3620b242 1
Franklin: gonna say goodbye I'm never gonna tell a lie and hurt you [Verse 2] We've known each other for so long And oh, the places that we've been But all the roads we took have led us here And now it's time to see there's more than friends [Chorus] I'm never gonna give you up I'm never gonna let you down I'm never gonna run around and desert you I'm never gonna make you cry I'm never gonna say goodbye I' (2/4)

Major features of Franklin

Setup

Settings

Name Description
/set franklin_api_key [apikey] This is the API key you need to get from OpenAI.
/set franklin_heartbeat_url [url] A url that the franklin script will hit every 30 seconds to show it has not crashed. This setting is optional, to turn it off: /set franklin_heartbeat_url "".
/set franklin_response_webserver_addr [address] server root URL for hosting the domain files franklin is running on. (e.g. https://franklin.oxasploits.com/said/).
/set franklin_http_location [dir] Server root location of files saved to be served by a web server. (e.g. /var/www/html/said/).
/set franklin_hard_limit [int] The hard limit of characters that the response should be to fit in an IRC chat. (e.g. greater than 30 and less than 300.)
/set franklin_word_limit [int] Limit of words that the API should generate from the backend. Should be ~1000.
/set franklin_max_retry [int] The number of times Franklin should retry generating a response if the previous attempts fail. Should be set anywhere from 2 to 5.
/set franklin_chatterbox_mode [int] An integer, 0 to 1000, 0 being silent unless spoken to, 1000 being says something every line.
/set franklin_history_length [int] Number of lines of chat history to remember. In lines, should be 5 to 8 lines.
/set franklin_blocklist_file [file] The file where the line-by-line nick blocklist is stored. Users listed in this file cannot use Franklin.
/set franklin_server_info [str] A brief user defined outline of what each server the bot is connected to is about, injected into the contextual prelude.
/set franklin_google_gtag [str] This is your google analytics G- tag id, for tracking the generated webpages.
/set franklin_asshat_threshold [float] This should be an floating point number from around 6 to 9, and is the kick threshold.
/set franklin_txid_chans [#chan1 #chan2] This is a list of channels where the Transactional Identification should be appended to the end of message. The channels should be seperated by spaces.
/set franklin_mem_approx [string] The amount of memory Franklin has to work with.
/set franklin_hdd_approx [string] The amount of hard drive space.
/set franklin_cpu_approx [string] Number of allocatable CPU cores.

Debugging

Now 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!)

Fraklin may fail due to heavy load on the API, connection issues, or the like. It has primitive recovery methods. However, one may reinitialize Fraklin with /script load franklin.pl.

Sometimes after running /quit in irssi, it is necessary to also run pkill irssi to reap any runaway franklin processes. The longer irssi has been running, the more this is an issue.

Occasionally, if franklin stalls and/or stop responding to queries, you can run /script load franklin.pl and this will usually rectify the issue. This can also be accomplished if franklin_helper.pl is loaded, by calling Franklin in channel like: "Franklin: reload".

Franklin has a log file you can check! You can look in the irssi settings to see where it is saved. You can usually view the online version of my Franklin instance.

Check if the message has been recorded in the said/ directory! It's usually in your webserver, so for me /var/www/franklin/. You can view mine!

Authors

oxagast / Marshall Whittaker

Thanks

The following people have found verified bugs, or asked for features that ended up being implemented.

atg, dclaw, proge, CerebraNet, morb, bookworm, denzuko, and more...