HectorPulido / discord-bot-LLama

It's a chatbot made with Python that simulates natural conversation with users. The chatbot is designed to be used in the Discord platform, providing an interactive experience for the users. LLAMA can run in user hardware or in colab.

Home Page:https://pequesoft.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LLAMA - Discord Chatbot

This repo is an implementartion of LLAMA/ALPACA. It's a chatbot made with Python that simulates natural conversation with users. The chatbot is designed to be used in the Discord platform, providing an interactive experience for the users.

image demo of the game

Installation

The following instructions will help you install LLAMA on your machine through the docker

Prerequisites

  • Docker
  • Docker Compose
  • Discord Token

Create the bot account and get the token

  1. Make sure you’re logged on to the Discord website.
  2. Navigate to the Applications.
  3. Click on the “New Application” button.
  4. Give the application a name and click “Create”.
  5. Navigate to the “Bot” tab to configure it.
  6. Make sure that Public Bot is ticked if you want others to invite your bot.
  7. Copy the token using the “Copy” button. do not share this token.
  8. Go to the “OAuth2 > URL Generator” tab.
  9. Tick the “bot” checkbox under “scopes”.
  10. Tick the permissions required for your bot to function under “Bot Permissions”.
  11. Now the resulting URL can be used to add your bot to a server. Copy and paste the URL into your browser, choose a server to invite the bot to, and click “Authorize”

Installation

  1. Clone the repository
git clone https://github.com/HectorPulido/discord-bot-LLama.git
  1. Create a .env file in the root directory of the project with the following content:
TOKEN_DISCORD='<FILL THIS WITH YOUR DISCORD TOKEN>'
CHAT_CHANNELS='<YOUR SERVER>:*' # <- This can be a channel or all the server
EMOJI_ONLY_CHANNELS='406975052286787585:944410045871947797' # This is a feature to only allow emojis in some channels

MEMORY_SIZE=4 # This is the memory size of the chatbot
TRANSLATOR=FALSE # This is a feature to translate the messages to english (if your server is in spanish)

MODEL_NAME='gemma:7b' # This is the model name of the chatbot
OLLAMA_URL='ollama' # This is the url of the chatbot, set it to 'ollama' if you are using the docker-compose file
  1. Build the docker image
docker-compose build
  1. Run the docker container
docker-compose up
  1. Invite the bot to your server using the URL generated in the previous steps

  2. Enjoy the bot! 🎉

If you need to run the bot on a Orange Pi 5 or some ARM device

You can check the previous version of this bot and follow the instructions in the following link: https://github.com/HectorPulido/discord-bot-LLama/tree/6c79b3bf2d3956617f6789934320352ae776adc2

License

This project is licensed under the MIT License. See the LICENSE file for details.


Let's connect 😋

Hector's LinkedIn     Hector's Twitter     Hector's Twitch     Hector's Youtube     Pequesoft website    

About

It's a chatbot made with Python that simulates natural conversation with users. The chatbot is designed to be used in the Discord platform, providing an interactive experience for the users. LLAMA can run in user hardware or in colab.

https://pequesoft.net

License:MIT License


Languages

Language:Python 99.1%Language:Dockerfile 0.9%