No description
  • Python 74.3%
  • JavaScript 13.1%
  • CSS 7.4%
  • HTML 4.7%
  • Shell 0.3%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
rasmus 657e43e5e6 immediately clear message input after submitting
prevents double sending messages when users press enter twice before the server acknowledges the message
2025-08-20 23:53:55 +02:00
backend only update fsm state when response is actually sent 2025-08-20 23:50:43 +02:00
frontend immediately clear message input after submitting 2025-08-20 23:53:55 +02:00
nginx revert accidental change in dev nginx conf 2025-08-03 00:50:54 +02:00
.gitignore notification sound 2025-08-10 15:18:28 +02:00
compose.yml notification sound 2025-08-10 15:18:28 +02:00
README.md add chatgpt context size limit 2025-08-15 00:55:24 +02:00

Weekly Chat

Setup

.env file

HOST_PORT=8001
HOST='weaver.enigmatics.org'
URL_PREFIX='emergencyweekly'
DEBUG=true

OPENAI_API_KEY="<openai_api_key>"
OPENAI_MODEL="gpt-4o-mini"
OPENAI_INPUT_TOKEN_LIMIT="80000"
DEFAULT_SYSTEM_PROMPT="You are a funny discord chatter."

OIDC_CLIENT_ID="<client_id>"
OIDC_CLIENT_SECRET="<client_secret>"
OIDC_METADATA_URL="https://enigmatics.org/o/.well-known/openid-configuration"

POSTGRES_DB="chat"
POSTGRES_USER="chat"
POSTGRES_PASSWORD="<postgres_password>"

RABBITMQ_USER="rabbit"
RABBITMQ_PASS="<rabbitmq_password>"

compose.override.yml (for development)

services:
  nginx:
    volumes:
      - ./nginx/dev.conf.d:/etc/nginx/conf.d:ro
  django:
    volumes:
      - ./backend:/app
  celery:
    volumes:
      - ./backend:/app

Note

With DEBUG=true, the django app will automatically reload on code changes. The celery app will not autoreload and can be restarted with podman compose restart celery.

First Start

After the first start, log in to your account and promote it to admin in the shell with podman compose exec django python manage.py shell:

from chat.models import User
user = User.objects.first()
user.is_superuser = True
user.is_staff = True
user.save()