Ywxig / AI

AI is a chat bot that was created to communicate with users in the Discord messenger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AI chatbot for Discord

AI is a chat bot that was created to communicate with users using a text generation algorithm based on Markov chips, random numbers, probabilities, text branching. Thanks to logical operations, the bot can generate text close to real text. The bot can act as a guide or just an interlocutor to maintain interest on the server. The bot has many settings, thanks to which you can get different characters, or behavior patterns.

Bot interaction

Perhaps the action with the bot occurs by sending a message to the Discord server. The response to the user's messages will return the same channel where the user's message was sent.

Technology stack

  • CuteON - Serializer to save reading data
  • Python - Programming language for programming logic
  • Discord.py - library for interacting with discord
  • pymorphy2 - To get keywords from text
  • pyowm - Module for getting the weather in the specified region

Recommendation: make sure you install all modules from the list!

Setting up your own bot

To configure the bot, go to the config.sws file and change the Token parameter to your token from the Discord developer portal. After that you can change other parameters

Config.sws parameter list

  • chance_choosing_full_pair - the chance of choosing the whole pair and not just one word from the text
  • chance_choosing_main_word - chance of choosing the first word from the text
  • chance_teleport - chance of jumping the message distance delta plus word index from the iteration
  • chance_use_message - chance of using a random word from the user's message
  • chance_use_next_word - chance of using the next word after the word chosen from the message if this word is in the text
  • match_percentage - the percentage of the match of the word, if the word is less than this coefficient, then the word is not considered necessary
  • chance_add_to_banlist - With what chance the word from the answer will be included in the list of not used words
  • Probability_descent_for_use_message - step, adding which will decrease the probability of using the message
  • max_size_respons - the maximum size of the bot's response to user messages
  • allowed_array_length - If the value of the unused array is greater than it will be reset to the standard value of the array

To customize the algorithm, you can change the parameters in the education/parameters.sws file, where you can specify your bot settings

About

AI is a chat bot that was created to communicate with users in the Discord messenger


Languages

Language:Python 73.7%Language:HTML 19.2%Language:CSS 7.1%