gpt_chat_bot/scripts/start-bot.sh
Dmitry Afanasyev 28895f3510
remove models update from migrations (#80)
* add bot models update script

* add last question at field

* update README.md
2024-01-08 21:33:35 +03:00

26 lines
527 B
Bash

#! /bin/bash
set -e
if [ -f shared/${DB_NAME:-chatgpt.db} ]
then
python3 core/bot/managment/update_gpt_models.py
fi
echo "starting the bot"
if [[ "${START_WITH_WEBHOOK}" == "true" ]]
then
echo "Starting bot in webhook mode..."
gunicorn main:create_app \
--workers ${WORKERS_COUNT} \
--bind ${APP_HOST}:${APP_PORT} \
--worker-class uvicorn.workers.UvicornWorker \
--timeout 150 \
--max-requests 2000 \
--max-requests-jitter 400
else
echo "Starting bot in polling mode..."
python main.py
fi