rai-serge-discord-bot/README.md

45 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2023-03-25 17:09:44 +00:00
# rAI - Serge Discord Bot
2023-04-07 19:01:53 +00:00
This is a discord client written in DiscordJS v14 based on DiscordV10
2023-03-25 17:09:44 +00:00
2023-04-07 19:06:48 +00:00
This bot is slash command based only and currently supports creating a session or "chat room" per user.
2023-03-25 17:09:44 +00:00
2023-04-07 19:06:48 +00:00
These sessions can be generated an unlimited amount of times.
The data on which roomID is active or which user is stored within a ./cache directory.
The cache file is named the DiscordID of the user creating the session. Session caches are overwritten on each request.
2023-03-25 17:09:44 +00:00
2023-04-07 19:01:53 +00:00
This bot also has the ability to edit start up paramaters for the room itself such as the Model, init-prompt, temperature and the repeat-penalty.
2023-03-25 17:09:44 +00:00
2023-04-07 19:01:53 +00:00
The bot will run a POST request for a static reply from serge, message response times will depend on the full generation window of your Serge instance.
2023-03-25 17:09:44 +00:00
2023-04-07 19:01:53 +00:00
Message intents are NOT supported in this bot, this is due to the verification that Discord is enabling.
2023-03-25 17:09:44 +00:00
2023-04-07 19:26:10 +00:00
# Commands
2023-04-07 19:24:42 +00:00
`/create-session` - create a new chat session Optional Options: (Model, init-prompt, temperature and the repeat-penalty)
`/view-session-id` - View your current session id
2023-04-07 19:25:08 +00:00
2023-04-07 19:24:42 +00:00
`/view-session-history` - View your current session id
2023-04-07 19:25:08 +00:00
2023-04-07 19:24:42 +00:00
`/chat` - Chat with the bot
2023-04-07 19:25:47 +00:00
# General Usage
2023-03-25 17:09:44 +00:00
1) Use ```npm i ```
2023-04-07 19:42:17 +00:00
2) Create a .env file ``` cp default.env .env```
2023-03-25 17:09:44 +00:00
2023-04-07 19:42:17 +00:00
3) Edit .env ```nano .env```
2023-03-25 17:09:44 +00:00
2023-04-07 19:07:45 +00:00
4) Go into https://discord.com/developers/applications and enable Privileged Intents
(This may not be needed at this point of you want to try without.)
2023-03-25 17:09:44 +00:00
2023-04-07 19:03:54 +00:00
5) Run the bot ```node rai.js```
2023-03-25 17:09:44 +00:00
Want to make this better? Issue a pull request!