Run an AI-powered Discord bot from the comfort of your laptop.
 
 
Go to file
Michael Yang 1f31c3d5a5 initial commit 2023-07-30 13:56:24 -07:00
.gitignore Initial commit 2023-07-30 12:43:45 -07:00
LICENSE Initial commit 2023-07-30 12:43:45 -07:00
Modelfile initial commit 2023-07-30 13:56:24 -07:00
README.md initial commit 2023-07-30 13:56:24 -07:00
discollama.py initial commit 2023-07-30 13:56:24 -07:00
poetry.lock initial commit 2023-07-30 13:56:24 -07:00
pyproject.toml initial commit 2023-07-30 13:56:24 -07:00

README.md

discollama

Dependencies

python3 -m pip install poetry
poetry install

Run discollama.py

poetry run python discollama.py

Note: You must setup a Discord Bot and set environment variable DISCORD_TOKEN before discollama.py can access Discord.

discollama.py requires an Ollama server. By default, it uses 127.0.0.1:11434 but this can be configured with command line parameters --ollama-host and --ollama-port.

The default LLM is llama2 but this can be configured with --ollama-model. A custom personality can be created by changing the SYSTEM instruction in the Modelfile and running ollama create discollama -f Modelfile. It can be referenced in discollama.py with --ollama-model discollama, e.g. poetry run python discollama.py --ollama-model discollama.