* add redis container * Updated Guides and Goals (#134) * Update README.md * Update commands-guide.md * Update events-guide.md * Update commands-guide.md * Added: redis client * Fixed: redis mock in commands.test.ts * Updated: npm package patches * Fixed: redis ip name in keys.ts * update Node LTS version, workflow env vars * Updated: node package engine requirements * Updated: documentation * fix: upgrade dotenv from 16.4.5 to 16.4.7 (#152) Snyk has created this PR to upgrade dotenv from 16.4.5 to 16.4.7. See this package in npm: dotenv See this project in Snyk: https://app.snyk.io/org/jt2m0l3y/project/d8b070a3-e4a3-457a-977b-7eb6a4a48346?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <snyk-bot@snyk.io> * Update: docs patches, connection ordering --------- Co-authored-by: snyk-bot <snyk-bot@snyk.io>
68 lines
4.7 KiB
Markdown
68 lines
4.7 KiB
Markdown
<div align="center">
|
|
<p><a href="#"><a href="https://ollama.ai/"><img alt="ollama" src="./imgs/ollama-icon.png" width="200px" /></a><img alt="+" src="./imgs/grey-plus.png" width="100px" /></a><a href="https://discord.com/"><img alt="discord" src="./imgs/discord-icon.png" width="195px" /></a></p>
|
|
<h1>Discord Ollama Integration</h1>
|
|
<h3><a href="#"></a>Ollama as your Discord AI Assistant</h3>
|
|
<p><a href="#"></a><a href="https://creativecommons.org/licenses/by/4.0/"><img alt="License" src="https://img.shields.io/badge/License-CC_BY_4.0-darkgreen.svg" /></a>
|
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/releases/latest"><img alt="Release" src="https://img.shields.io/github/v/release/kevinthedang/discord-ollama?logo=github" /></a>
|
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml"><img alt="Build Status" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml/badge.svg" /></a>
|
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/release.yml"><img alt="Release Status" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/release.yml/badge.svg" /></a>
|
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml"><img alt="Testing Status" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml/badge.svg" /></a>
|
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/coverage.yml"><img alt="Code Coverage" src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kevinthedang/bc7b5dcfa16561ab02bb3df67a99b22d/raw/coverage.json"></a>
|
|
</div>
|
|
|
|
## About/Goals
|
|
Ollama is an AI model management tool that allows users to install and use custom large language models locally.
|
|
The project aims to:
|
|
* [x] Create a Discord bot that will utilize Ollama and chat to chat with users!
|
|
* [x] User Preferences on Chat
|
|
* [x] Message Persistance on Channels and Threads
|
|
* [x] Threads
|
|
* [x] Channels
|
|
* [x] Containerization with Docker
|
|
* [x] Slash Commands Compatible
|
|
* [x] Generated Token Length Handling for >2000
|
|
* [x] Token Length Handling of any message size
|
|
* [x] User vs. Server Preferences
|
|
* [ ] Redis Caching
|
|
* [x] Administrator Role Compatible
|
|
* [x] Multi-User Chat Generation (Multiple users chatting at the same time) - This was built in from Ollama `v0.2.1+`
|
|
* [x] Automatic and Manual model pulling through the Discord client
|
|
|
|
Further, Ollama provides the functionality to utilize custom models or provide context for the top-layer of any model available through the Ollama model library.
|
|
* [Customize a model](https://github.com/ollama/ollama#customize-a-model)
|
|
* [Modelfile Docs](https://github.com/ollama/ollama/blob/main/docs/modelfile.md)
|
|
|
|
## Documentation
|
|
These are guides to the features and capabilities of this app.
|
|
* [User Slash Commands](./docs/commands-guide.md)
|
|
* [Client Events](./docs/events-guide.md)
|
|
|
|
## Environment Setup
|
|
* Clone this repo using `git clone https://github.com/kevinthedang/discord-ollama.git` or just use [GitHub Desktop](https://desktop.github.com/) to clone the repo.
|
|
* You will need a `.env` file in the root of the project directory with the bot's token. There is a `.env.sample` is provided for you as a reference for what environment variables.
|
|
* For example, `CLIENT_TOKEN = [Bot Token]`
|
|
* Please refer to the docs for bot setup.
|
|
* [Creating a Discord App](./docs/setup-discord-app.md)
|
|
* [Local Machine Setup](./docs/setup-local.md)
|
|
* [Docker Setup for Servers and Local Machines](./docs/setup-docker.md)
|
|
* Nvidia is recommended for now, but support for other GPUs should be development.
|
|
* Local use is not recommended.
|
|
|
|
## Resources
|
|
* [NodeJS](https://nodejs.org/en)
|
|
* This project runs on `lts\jod` and above.
|
|
* This project requires the use of npm version `10.9.0` or above.
|
|
* [Ollama](https://ollama.com/)
|
|
* [Ollama Docker Image](https://hub.docker.com/r/ollama/ollama)
|
|
* [Redis](https://redis.io/)
|
|
* [Redis Docker Image](https://hub.docker.com/_/redis)
|
|
* [Discord.js Docs](https://discord.js.org/docs/packages/discord.js/main)
|
|
* [Setting up Docker (Ubuntu 20.04)](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04)
|
|
* [Setting up Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
|
|
|
|
## Acknowledgement
|
|
* [Kevin Dang](https://github.com/kevinthedang)
|
|
* [Jonathan Smoley](https://github.com/JT2M0L3Y)
|
|
|
|
[discord-ollama](https://github.com/kevinthedang/discord-ollama) © 2023 by [Kevin Dang](https://github.com/kevinthedang) is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|