Follow the discord.js guide to create a bot and add it to a server.
Create a .env
file from the .env.template
in the root directory of the project. DISCORD_BOT_GUILD_ID
is the id of the server the bot is added to. It's not recommended to add the bot to multiple servers.
An OpenAI compatible api will be generated from this collab. The URL can be found in the console after OpenAI compatible API URL
.
A model adapter will need to be created in src/config/models
from the model.template.yml
. For example,
name: mistral
description: The mistral model hosted on oobabooga collab
url: https://sandwich-descriptions-ease-wto.trycloudflare.com
Note: Be sure to remove the /v1
from the end of the url that the collab generates.
The bot can be run with npm start
.
The first time the bot is run, it will need the commands to be registered. This can be done with npm run deploy-commands
. The commands will need to be redeployed after any changes to the commands.
The adapter can be set from the bot using the /model set
command. The choices will be based on the name
field of the adapters.
The bot can be interacted with using the /ask
for a zero-context question.