Crates.io | rustchain_discord_bot |
lib.rs | rustchain_discord_bot |
version | 1.0.0 |
source | src |
created_at | 2023-09-10 21:07:30.737563 |
updated_at | 2023-09-10 21:07:30.737563 |
description | A Discord bot for LLM chain apps |
homepage | |
repository | |
max_upload_size | |
id | 969012 |
size | 88,363 |
rustchain-discord-bot
is a powerful Discord bot designed to interact with users in real-time chat within a Discord thread using the /chat
command. By default, the bot integrates with OpenAI to leverage various GPT models for dynamic and rich conversations. The underlying code is based on the Rust crate llm-chain
, which is inspired by LangChain. This provides the bot with extensibility and customization, offering a wide array of potential capabilities.
/chat
command.llm-chain
.Step 1: Navigate to Discord Developer Portal.
Step 2: Click on the New Application
button to create a new application.
Step 3: Under the Privileged Gateway Intents
section, ensure the Message Content Intent
is enabled. Alternatively, you may use the Permissions intent with a value of 326417590272
.
Step 4: Click on the Bot
section on the left sidebar.
example.env
and rename it to .env
.DISCORD_TOKEN
with your bot token.config.rs
under the variable BOT_NAME
.Step 5: In the OAuth2
section, create an invite URL and save it. Open this URL in a browser to add the bot to your server.
config.rs
file to set your bot name and OpenAI model.llm.rs
under the options
function.cargo run
.