Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
perf: Use guvicorn as ASGI web server
Clémence Lesné69677219246f
diff --git a/Dockerfile b/Dockerfileindex be0944c..7ca8f22 100644--- a/Dockerfile+++ b/Dockerfile@@ -42,4 +42,4 @@ COPY --chown=appuser:appuser . /appWORKDIR /app-CMD ["bash", "-c", "WEB_CONCURRENCY=4 uvicorn main:api --host 0.0.0.0 --port 8080 --proxy-headers --no-server-header --timeout-keep-alive 60 --header x-version:${VERSION}"]+CMD ["bash", "-c", "gunicorn main:api --bind 0.0.0.0:8080 --proxy-protocol --workers 4 --worker-class uvicorn.workers.UvicornWorker"]diff --git a/Makefile b/Makefileindex d62f970..62bb9bc 100644--- a/Makefile+++ b/Makefile@@ -65,7 +65,7 @@ test:@echo "➡️ Running deptry..."python3 -m deptry \--ignore-notebooks \- --per-rule-ignores "DEP002=aiohttp|uvicorn" \+ --per-rule-ignores "DEP002=aiohttp|gunicorn" \.@echo "➡️ Running Pytest..."@@ -94,15 +94,13 @@ tunnel:devtunnel host $(tunnel_name)dev:- VERSION=$(version_full) API__EVENTS_DOMAIN=$(tunnel_url) python3 -m uvicorn main:api \- --header x-version:$${VERSION} \- --no-server-header \- --port 8080 \- --proxy-headers \+ VERSION=$(version_full) API__EVENTS_DOMAIN=$(tunnel_url) python3 -m gunicorn main:api \+ --bind 0.0.0.0:8080 \+ --proxy-protocol \--reload \- --reload-include .env \- --reload-include config.yaml \- --timeout-keep-alive 60+ --reload-extra-file .env \+ --reload-extra-file config.yaml \+ --worker-class uvicorn.workers.UvicornWorkerbuild:$(docker) build \diff --git a/requirements-dev.txt b/requirements-dev.txtindex 3b68b6f..070c41d 100644--- a/requirements-dev.txt+++ b/requirements-dev.txt@@ -7,4 +7,3 @@ pytest-asyncio==0.23.6 # Required for pytestpytest-repeat==0.9.3 # Required for pytestpytest-xdist[psutil]==3.5.0 # Required for pytestpytest==8.1.1-watchfiles==0.21.0 # Required for uvicorn auto-reloaddiff --git a/requirements.txt b/requirements.txtindex 971ad4a..f65a6df 100644--- a/requirements.txt+++ b/requirements.txt@@ -10,6 +10,7 @@ azure-identity==1.15.0 # Required for all Azure SDKsazure-monitor-opentelemetry==1.3.0azure-search-documents==11.6.0b3fastapi==0.110.1+gunicorn==22.0.0jinja2==3.1.3json-repair==0.13.0mistune==3.0.2@@ -32,4 +33,3 @@ tenacity==8.2.3tiktoken==0.6.0twilio==9.0.5typing-extensions==4.11.0-uvicorn[standard]==0.28.0