A Discord bot, written in Rust, that generates responses using any language model supported by llm.
Built on top of llm.
See llm's README.
- Create a Discord application and fill it out with your own details.
- Go to
Botand create a new Bot.- Hit
Reset Token, and copy the token it gives you somewhere.
- Hit
- Go to
OAuth2 > URL Generator, selectbot, then selectSend MessagesandUse Slash Commands.- Go to the URL it generates, and then invite it to a server of your choice.
- Install Rust 1.68 or above using
rustup. - Run
cargo run --releaseto start llmcord. This will auto-generate a configuration file, and then quit. - Fill in the configuration file with the required details, including the path to the model.
- You can then run llmcord to your heart's content.
Note that you can define your own commands in the configuration, like so:
[commands.makecaption]
enabled = true
description = "Attempts to make an image description for the given prompt."
prompt = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Create an evocative image description for "{{PROMPT}}".
### Response:
"""