mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-12 11:56:06 -05:00
* fix: workflow env * update: center title on readme * update: readme goals and format * add: icons in readme * fix: plus margin * update: environment variables in contr. * add: queue for chat history * add: set -e for workflow failure * update: version increment * fix: client null info * fix: shutoff issues
2.3 KiB
2.3 KiB
Run the Bot
- Refer to all sections below before running the bot.
- You should now have
Ollama,NodeJS, rannpm install. - You will also need a discord bot to run. Refer to the developer portal to learn how to set one up and invite it to your server. If that does not help then look up a YouTube video like this one.
- Now run
npm run startto run the client and ollama at the same time (this must be one in wsl or a Linux distro)
Set up (Development-side)
- Pull the repository using
https://github.com/kevinthedang/discord-ollama.git. - Refer to
Ollama Setupin the readme to set up Ollama.- This must be set up in a Linux environment or wsl2.
- Install NodeJS
v18.18.2- You can check out
ResourcesandTo Runin the readme for a bit of help. - You can also reference NodeJS Setup
- You can check out
- When you have the project pulled from github, open up a terminal and run
npm iornpm installto get all of the packages for the project. - In some kind of terminal (
git bashis good) to run the client. You can run Ollama but opening up wsl2 and typingollama serve.- Refer to
Ollama Setupif there are any issues.
- Refer to
Environment
- You will need two environment files:
.env: for running the bot- Please refer to
.env.samplefor all environment variables to include
- Please refer to
.env.dev.local: also runs the bot, but with development variables- Currently there are no differences between the two, but when needed, you may add environment variables as needed.
NodeJS Setup
- Install nvm using
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash- Ensure this in the profile of what shell you use (for
git bashit would be.bash_profilefound in your home directory)
- Ensure this in the profile of what shell you use (for
- Ensure it has been install correctly by running
nvm -v - Now, install
v18.18.2by runningnvm install 18.18.2 - Then run
nvm use 18.18.2 | nvm alias default 18.18.2or you can run them separately if that does not work. This just sets the default NodeJS tov18.18.2when launching a shell.