mercm8 / chat-llama-discord-bot

A Discord Bot for chatting with LLaMA, Vicuna, Alpaca, or any other LLM supported by text-generation-webui or llama.cpp.
https://discord.gg/TcRGDV754Y
MIT License
16 stars 4 forks source link

note: last working ooba commit: 19f7868

ChatLLaMA Discord Bot

A Discord Bot for chatting with LLaMA, Vicuna, Alpaca, or any other LLaMA-based model. It's not as good as ChatGPT but LLaMA and its derivatives are pretty impressive on their own. Tag the bot with it's @username or mention it by name to talk to it. Give it a channel of its own to avoid having to tag it every time. Use /character to change to other characters in your character folder.

Use regen to make the bot forget and regenerate the previous response. Useful to guide it in a direction. Use /cont if you're too lazy to type "continue".

To clear chat history with LLaMA or change the initial prompt, use /reset. Sometimes LLaMA will get stuck or you will want to change the initial prompt to something more interesting so /reset is well used.

Can use A1111 if it is in api mode with /pics command:

image

Can also just ask directly to take a selfie or take a picture:

image image

Note the additions to the Llayla character in the characters folder, showing how to provide optional SD prompts the bot can use when taking pictures or selfies, if you're after a particular style or look. It will use whatever model is loaded in the webgui of Automatic 1111.

Setup

  1. Setup text-generation-webui with their one-click installer and download the model you want (for example decapoda-research/llama-7b-hf). Make sure it's working.

  2. Edit config.py with your Discord bot's token

  3. Place bot.py and config.py inside the text-generation-webui directory

  4. Place your character file(s) in the characters folder. One of them should have the same name as your bot.

  5. Open the cmd file that came with the one-click installer

  6. Install discord.py with pip install discord

  7. Run the bot with python bot.py

Notes: