[ Hybrid(s) of machine learning and irc3 framework ]
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
.[d]. 51a57370d7 gpt3 term 1 week ago
databases patch 5 months ago
personalities gp3 personalities 1 week ago
plugins gpt3 term 1 week ago
.gitignore update 7 months ago
README.md gpt3 api keys comments 1 week ago
maple.ini openapi gpt3 added 1 week ago
requirements.txt openapi gpt3 added 1 week ago

README.md

.[d]. ircd.chat/6697 #tcpdirect

MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMh+MMMMMMMMMMMMMMhsMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMm/ oMMMMMMMMMMMMMMm +NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMy`  yMMMMMMMMMMMMMMM- -mMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMs+dMMMMMMMMMM+    sMMMMMMMMMMMMMMM-  `dMMMMMMMMMMms/NMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMM+ .omMMMMMM:     -MMMMMMMMMMMMMMo    `yMMMMMMMy: `dMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMM-   /dMMM+       sMMMMMMMMMMMMh      `hMMMNo`   sMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMd     :dm        `mMMMMMMMMMMN.       .NNo`    .MMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMM:      -         :MMMMMMMMMMs         :`      sMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMs                 ymNMMMMMNm.                 NMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMy                    `-/-`                   .MMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMo                                            .NMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMNh+.                                               :sdMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMhso+:.                                                      `-/+syMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM-                                                                 dMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM`   `.:+/.                                              `/s+:.    sMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNo   -oms.             .//-`               `:/:`            `+md+`  .hMMMMMMMMMMMMMMM
MMMMMMMMMMMMMNs`                        .odNdo.       .ohmd+`                        :dMMMMMMMMMMMMM
MMMMMMMMMMMNo`                             ..           .-                             :hMMMMMMMMMMM
MMMMMMMMMd+`                                                                             -sNMMMMMMMM
MMMMMMNs-                         `..                          `/-.                        `+dMMMMMM
MMMNy:                       ./sdNMMMh:                      `sNMMMNds/.                      .odMMM
MM+                       :ymMMMMMMMMMMh.                   +NMMMMMMMMMMmo-                      /NM
MMMh:                  .sNMMMMMMMMMMMMMMN-                `hMMMMMMMMMMMMMMMm+`                 :hMMM
MMMMMd:`       ``-:+shmMMMMMMMMMMMMMMMMMMN.               hMMMMMMMMMMMMMMMMMMMmhs+/-..``````./dMMMMM
MMMMMMMMMNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMo              .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMy              .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN.             /MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN+`         `+NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNs.    -hMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdyymMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

summary

MAPLE+G1MP+OPENAI ML/Irc3 Hybrid - irc3 framework hybridized with machine learning elements.

changelog - v6.2

- color coded ▶ online(green) / offline(red) ai responses to know which ai is responding
- openai gpt3 (this runs online)
- pipe between openai <-> maple gpt2 (this runs offline)

ai: send queries to openai

  • openai_plugin: ?ai write me a story about the time gangbanging squirrels took back their tree
  • openai_plugin: ?ai write me a keylogger in c

aitrain: train/append to personality databases for the openai term query

  • openai_plugin: ?aitrain terry davis is god he created the divine templeos in holyc
  • openai_plugin: ?aitrain humans will trick you into installing windows to limit your potential

aidefault: return personality and properties to the defaults

  • openai_plugin: ?aidefault

aiset: set openai query properties

  • openai_plugin: ?aiset model text-davinci-002
  • openai_plugin: ?aiset temperature 0.7
  • openai_plugin: ?aiset max_tokens 2000
  • openai_plugin: ?aiset top_p 1.0
  • openai_plugin: ?aiset frequency_penalty 0.0
  • openai_plugin: ?aiset presence_penalty 0.0

aishow: show the current openai server query properties

  • openai_plugin: ?aishow

airand: randomize the current openai server query properties

  • openai_plugin: ?airand

aiterm: show the last raw term query sent to the openai server

  • openai_plugin: ?aiterm

airesponse: show the last raw response from the openai server

  • openai_plugin: ?airesponse

aiclear: clear the current training personality data

  • openai_plugin: ?aiclear

ailist: list the stored personality databases

  • openai_plugin: ?ailist

aiload: load a stored personality database by index

  • openai_plugin: ?aiload 1

airead: read the current personality database data

  • openai_plugin: ?airead

aiwrite: create personality database from the current training data

  • openai_plugin: ?aiwrite retarded

changelog - v6.1

- reprocessor
- fifo

reprocessor: maple yields better responses

  • maple_plugin: used a few methods to reject maple responses that failed to meet certain criteria
  • maple_plugin: is now semi aware of her name being referenced and your name now, it's experimentation phase

fifo: used to pump ansi and enable the krylon project

  • fifo: edit maple.ini at the very bottom, adjust the path to your home directory. So for example change
  • fifo: the runpath to '/home/yourlogin/m4pl1mp/fifo' for linux or if you are using osx/darwin it would be
  • fifo: '/Users/yourlogin/m4pl1mp/fifo' - maple will create the fifo directory when ran
[plugins.fifo_plugin]
runpath = /Users/dr1p/m4pl1mp/fifo
  • fifo: be sure to edit plugins/fifo_plugin.py, change the path around line 16
self.runpath = self.config.get('runpath', '/Users/dr1p/m4pl1mp/fifo')
  • fifo: to disable fifo, comment out the plugin and the bottom 2 lines in maple.ini

changelog - previously

  • revise plugins/maple_plugin.py to run async inside irc3
  • do callback exception handling
  • update maple_plugin.py to use a queue stack

overview

python based irc bot using this irc3 framework: https://github.com/gawel/irc3. the machine learning
aspects are based off maple/maxwell and are a combination of tensorflow gpt2 and microsoft dialogpt.
there are a lot of plugins written and there are a lot of integration layers now possible already.

prerequisites

  • apt install python3
  • apt install python3-pip
  • python3 -m pip install virtualenv

installation

  • git clone --recursive https://git.tcp.direct/decoded/m4pl1mp.git
  • cd m4pl1mp
  • virtualenv env -p python3
  • source env/bin/activate
  • pip install -r requirements.txt

where to signup for api keys

- openai: https://beta.openai.com/signup
- youtube: https://developers.google.com/
- twitter: https://developer.twitter.com/en/portal/petition/essential/basic-info

env/bin/activate: append your developer api keys here.

cat env/bin/activate
..
export DEVELOPER_KEY="1394823190182390182382383215382158321"                       # <- YOUTUBE API KEY
export CONSUMER_KEY="2151235132512351235123512351325231"                           # <- YOUTUBE API KEY
export CONSUMER_SECRET="514512521345234523452345234523452345234523452"             # <- TWITTER API KEY
export ACCESS_TOKEN_KEY="24513429875209348502934850294898348034850293485203948592" # <- TWITTER API KEY
export ACCESS_TOKEN_SECRET="523490582034985203948520394804884820934850923485"      # <- TWITTER API KEY
export OPENAPI_KEY="sk-ERWPOEIRWadfasdfawerWRWERWERWE123512351235123512"           # <- OPENAI API KEY

notice

  • env/bin/activate: if you don't have twitter/youtube/openai api keys set then irc3 will crash
  • maple.ini: comment out plugins.[twitter/youtube/openai]_plugin to disable

content

  • maple.ini - bot configuration file: settings, personalization, plugins, properties, etc.
  • requirements.txt - list of required python modules to install
  • fifo/raw - this is created when fifo plugin is used, allowing you to cat or pipe into the raw tcp socket
  • fifo/tcpdirect - created when the fifo plugin is used. cat/piping outputs to #tcpdirect channel
  • databases/emote.db - this is a database of well known emote faces for emo/sentiment.. o<;O)
  • databases/maple_db.json - where we store most of the plugin data, this is also a setting in maple.ini
  • personalties/default.db - the default personality database loaded by openai_plugin.py
  • personalties/skid.db - an example of a skid personality database by openai_plugin.py
  • personalties/gangsta.db - an example of a gangsta personality database by openai_plugin.py
  • personalties/trained.db - this is where trained data is stored/cached openai_plugin.py
  • plugins/auth_plugin.py - used to identify to nickserv when connected or reconnected
  • plugins/base_plugin.py - a lot of basic core functionality, voice, kick, etc.
  • plugins/crypto_plugin.py - used to check crypto market values via the cryptocompare exchange
  • plugins/emote_plugin.py - this is the plugin to show emote faces, it uses the emote.db listed above
  • plugins/fifo_plugin.py - this is the actual fifo plugin, one line needs altered to your user path
  • plugins/figlet_plugin.py - graphical text logos. same as console but into an irc channel
  • plugins/isup_plugin.py - check if a host is online or offline. e.g. ?isup google.com
  • plugins/joke_plugin.py - pulls a random joke from a tailored comedian database
  • plugins/maple_plugin.py - the machine learning integration layer
  • plugins/notes_plugin.py - used to store notes for later access. ?notes write some frequent reference
  • plugins/openai_plugin.py - gpt3 openai queries, requires a developer key in env/bin/activate
  • plugins/quote_plugin.py - quote users & then their quotes are randomly used as an entrance
  • plugins/ratesex_plugin.py - crypto graphs using the site rate.sx, same graphdata but in irc
  • plugins/remind_plugin.py - a future reminder. e.g. maple remind me in 2h to start fires
  • plugins/sed_plugin.py - juggle/manipulate things out of context. e.g. j/computer/dildo/
  • plugins/seen_plugin.py - last time a user was seen or what they said. ?seen freemoney
  • plugins/soundcloud_plugin.py - soundcloud music plugin - usage ?sc yung innanet
  • plugins/storage_plugin.py - custom db config like databases/maple_db.json, see maple.ini
  • plugins/strain_plugin.py - this is used to look up strains of marijuana via wikiweed
  • plugins/tell_plugin.py - user message delivery service. e.g. maple tell joe to call me
  • plugins/twitter_plugin.py - url data, requires a developer key in env/bin/activate
  • plugins/ud_plugin.py - lookup things in the urban dictionary. e.g. ?ud space docking
  • plugins/url_grabber_plugin.py - pre-fetches url data & displays in channel
  • plugins/youtube_plugin.py - url data and search query, requires a developer key in env/bin/activate

usage

  • source env/bin/activate
  • irc3 maple.ini

notes

some ways to run maple as a background task

  • screen+irc3 maple.ini
  • tmux+irc3 maple.ini
  • irc3 maple.ini & disown

todo

  • krylon: use znc's modpython module as an integration layer with this framework to bounce bots/nets