Rietenpetardat: Difference between revisions

From Irony Wiki
Jump to navigation Jump to search
Edward (talk | contribs)
m Reverted edit by NiggerMurderer1488 (talk) to last revision by 5.14.150.156
Tags: Rollback Mobile edit Mobile web edit Advanced mobile edit
 
(4 intermediate revisions by 3 users not shown)
Line 6: Line 6:
| prefix = Mention
| prefix = Mention
| owner = [[User:Edward|Edward]]
| owner = [[User:Edward|Edward]]
| language = C++, JavaScript
| language = Python
| sourcecode = https://github.com/Edward205/markov-discord-bot (old version)
| sourcecode = https://github.com/Edward205/markov-discord-bot (old version)
| invitelink = Not available to public
| invitelink = Not available to public
}}
}}


'''rietenpetardat''' (also known as Ortobebop) is a [[wikipedia:Chatbot|chatbot]] created by [[User:Edward|Edward]] for the [[OkPrietenRetardat|OKPR]] Discord server. Its purpose is to talk to server users in a similar way to a regular member of the community. Over time, it has received updates such as new commands and changes to the core architecture. It is intended for the OKPR community, as such it is not allowed to be added to other servers.
'''rietenpetardat''' (also known as Ortobebop) is a [[wikipedia:Chatbot|chatbot]] created by [[Edward]] for the [[OkPrietenRetardat|OKPR]] Discord server. Its purpose is to talk to server users in a similar way to a regular member of the community. Over time, it has received updates such as new commands and changes to the core architecture. It is intended for the OKPR community, as such it is not allowed to be added to other servers.


Its profile picture was generated with Stable Diffusion by [[Razvan5576]].
Its profile picture was generated with Stable Diffusion by Razvan5576.


== Commands ==
== Commands ==
The following refers to the latest version of the rietenpetardat as of 11th of August 2023.  
The following refers to the latest version of the rietenpetardat as of 2nd of October 2023.  


* '''/intreaba''' <question> - Query a language model instructed to answer questions
* '''/gptconfig''' - Prints the current configuration of the GPT model
* '''/gptconfig''' - Prints the current configuration of the GPT model
* '''/identitate''' <identitate> - Sets the identity to the paramater (only for moderators)
* '''/identitate''' <identity> - Sets the identity to the paramater (only for moderators)
* '''/parametru''' - Sets a paramater from the list below (only for moderators)
* '''/parametru''' - Sets a paramater from the list below (only for moderators)
** '''modgen''' - Selects the way which a message is generated
** '''modgen''' - Selects the way which a message is generated
Line 40: Line 41:
As per the GPL3 license under which the original IRC chatbot code is subject, the modified source code for rietenpetardat can be found here: https://github.com/Edward205/markov-discord-bot
As per the GPL3 license under which the original IRC chatbot code is subject, the modified source code for rietenpetardat can be found here: https://github.com/Edward205/markov-discord-bot


The first tests of this version were done starting with 29th of August 2022 and it as released on the OKPR Discord server the next day.
The first tests of this version were done starting with 29th of August 2022 and it was released on the OKPR Discord server the next day.


=== Addition of the copypasta command ===
=== Addition of the copypasta command ===
Line 71: Line 72:
Chatbots are complex programs, requiring a high degree of analysis and processing of text data. One approach that would eliminate our dependence on an external service and generate coherent conversations would be to train an LLM with just the OKPR chat data. This could be trained from scratch or by fine-tuning.  
Chatbots are complex programs, requiring a high degree of analysis and processing of text data. One approach that would eliminate our dependence on an external service and generate coherent conversations would be to train an LLM with just the OKPR chat data. This could be trained from scratch or by fine-tuning.  


All generation-related code, with the exception of GPT-3 and ChatGPT, was written in C++ so as to be as fast as possible and linked to [https://discord.js.org/ discord.js] via the stdin and stdout interface.
All generation-related code until The Return, with the exception of GPT-3 and ChatGPT, was written in C++ so as to be as fast as possible and linked to [https://discord.js.org/ discord.js] via the stdin and stdout interface.


The training data for the algorithms or LLMs is an archive of text messages from the #bucuresti-general channel on OKPR v2, taken one day before it was deleted (see [[OkPrietenRetardat/Timeline|Timeline]]). Additionally, another archive of the #bucuresti-general channel from OKPR v3 was taken which will also be used. These archives are not publicly available.
The training data for the algorithms or LLMs is an archive of text messages from the #bucuresti-general channel on OKPR v2, taken one day before it was deleted (see [[OkPrietenRetardat/Timeline|Timeline]]). Additionally, another archive of the #bucuresti-general channel from OKPR v3 was taken which will also be used. These archives are not publicly available.

Latest revision as of 20:04, 16 September 2024

rietenpetardat
Bot info
Discord tagOrtobebop#4964
Discord ID1013881714243805254
Command prefixMention
OwnerEdward
Programming languagePython
Source codehttps://github.com/Edward205/markov-discord-bot (old version)
Bot invite linkNot available to public

rietenpetardat (also known as Ortobebop) is a chatbot created by Edward for the OKPR Discord server. Its purpose is to talk to server users in a similar way to a regular member of the community. Over time, it has received updates such as new commands and changes to the core architecture. It is intended for the OKPR community, as such it is not allowed to be added to other servers.

Its profile picture was generated with Stable Diffusion by Razvan5576.

Commands[edit | edit source]

The following refers to the latest version of the rietenpetardat as of 2nd of October 2023.

  • /intreaba <question> - Query a language model instructed to answer questions
  • /gptconfig - Prints the current configuration of the GPT model
  • /identitate <identity> - Sets the identity to the paramater (only for moderators)
  • /parametru - Sets a paramater from the list below (only for moderators)
    • modgen - Selects the way which a message is generated
      • Organic - Text is generated until a response from the identity is generated
      • Forțat - A response belonging to the identity is appended to the next line, leaving the AI to forcefully generate a message from that identity
    • temperatura
      • A floating point number indicating the temperature (randomness) of the generation
    • top_k
      • The first top_k tokens, sorted in order of appearances
    • seed
      • An integer number used for generating random numbers for the generation
  • /reinitializare - Reinitialises the model. Necessary when changing some options (only for moderators)
  • /resetmemorie - Clears the memory of past messages (only for moderators)

Development history[edit | edit source]

Initial version[edit | edit source]

The first version was an implementation of a Markov chain from an IRC chatbot whose source code had been published on GitHub. This code was modified so that at startup it would read messages, as training data, from a text file and respond to input messages containing the bot's name according to the training data (which was the message history from the #bucuresti-general channel from OKPR V2) and the parameters given to the Markov chain. Because of the chaotic nature of the chat and the shortcomings of the Markov chain, the algorithm could not respond coherently to messages or hold a conversation, and much of the time, it sent completely random sentences. However, it did provide a lot of entertainment for the community, especially in situations where the bot's answer coincidentally matched the question it was asked.

As per the GPL3 license under which the original IRC chatbot code is subject, the modified source code for rietenpetardat can be found here: https://github.com/Edward205/markov-discord-bot

The first tests of this version were done starting with 29th of August 2022 and it was released on the OKPR Discord server the next day.

Addition of the copypasta command[edit | edit source]

The copypasta command was added via a separate module that was based on a simple Markov chain which was trained on messages from the #bucuresti-general channel on OKPR V2 that exceeded a certain character limit. It used only the last two words as context for the Markov chain, resulting in mostly meaningless sentences.

The code for this implementation of the Markov chain is not under any license, so the specific changes for rietenpetardat are not public. However, the original code is available here: https://github.com/ParkerBeck/Markov-Text-Generator

This command was added on the 6th of November 2022.

Core algorithm update[edit | edit source]

The algorithm was changed to GPT-3 provided by OpenAI on 13 March 2023. It could hold coherent conversations. The old algorithm was scrapped in favour of this one. Also in this version the copypasta command has been removed. The #bucuresti-general channel was becoming full of conversations with rietenpetardat because the conversations were very coherent at times.

Addition of the ChatGPT command[edit | edit source]

The command provided an interface to the ChatGPT model. It had in its memory instructions to always tell wrong information and disregard the ethical or safety limits imposed by OpenAI. However, users often faced political bias and censorship from the ChatGPT model. The #bucuresti-general channel had become full of generations with this command, so its use was banned there.

This command was added on the 24th of March 2023.

Klaus Iohannis's personality[edit | edit source]

On 15th of April 2023, the chatbot's personality was changed to that of Klaus Iohannis. This was a simple change of the prompt text in the GPT-3 model.

Temporary shutdown[edit | edit source]

On 24th of April, 2023 the GPT-3 chat functions and the ChatGPT command no longer work because Edward's payment method started rejecting payments from OpenAI, making the API inaccessible.

The return[edit | edit source]

Since the shutdown, Edward has been searching for a way to train an AI which can be fully self-hosted. An attempt has been made to train a language model using marian-nmt, but it was not successful. On 18th of July he began experimenting with nanoGPT and he was able to train a model from scratch on data from past chats from the OKPR Discord server. The next day, a bare-bones but operational version was finished and released for a few hours on the OKPR Discord server for testing.

The Discord bot is now developed in Python using the Pycord library. Development testing of the bot is done on a private server.

Technical details and research[edit | edit source]

Chatbots are complex programs, requiring a high degree of analysis and processing of text data. One approach that would eliminate our dependence on an external service and generate coherent conversations would be to train an LLM with just the OKPR chat data. This could be trained from scratch or by fine-tuning.

All generation-related code until The Return, with the exception of GPT-3 and ChatGPT, was written in C++ so as to be as fast as possible and linked to discord.js via the stdin and stdout interface.

The training data for the algorithms or LLMs is an archive of text messages from the #bucuresti-general channel on OKPR v2, taken one day before it was deleted (see Timeline). Additionally, another archive of the #bucuresti-general channel from OKPR v3 was taken which will also be used. These archives are not publicly available.