Skip to content

Commit 1e7be93

Browse files
committed
increase timeout
1 parent 055638f commit 1e7be93

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

services/chatbot/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ "$TLS_ENABLED" = "true" ] || [ "$TLS_ENABLED" = "1" ]; then
2828
fi
2929
echo "TLS_CERTIFICATE: $TLS_CERTIFICATE"
3030
echo "TLS_KEY: $TLS_KEY"
31-
gunicorn --workers=1 --threads=20 --timeout 60 --bind 0.0.0.0:${SERVER_PORT} --certfile $TLS_CERTIFICATE --keyfile $TLS_KEY --log-level=debug chatbot_api:app
31+
gunicorn --timeout 600 --bind 0.0.0.0:${SERVER_PORT} --certfile $TLS_CERTIFICATE --keyfile $TLS_KEY --log-level=debug chatbot_api:app
3232
else:
33-
gunicorn --bind 0.0.0.0:${SERVER_PORT} chatbot_api:app
33+
gunicorn --timeout 600 --bind 0.0.0.0:${SERVER_PORT} chatbot_api:app
3434
fi

services/chatbot/src/chatbot_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def init_bot():
9595
app.logger.debug("Initializing bot")
9696
try:
9797
with loaded_model_lock:
98-
if os.environ.get("CHATBOT_OPENAI_API_KEY") is not None:
98+
if os.environ.get("CHATBOT_OPENAI_API_KEY"):
9999
app.logger.info("Using OpenAI API Key from environment")
100100
os.environ["OPENAI_API_KEY"] = os.environ.get("CHATBOT_OPENAI_API_KEY")
101101
elif "openai_api_key" not in request.json:

0 commit comments

Comments
 (0)