- Python 3.11+
pip
- Optional: Docker
| Variable |
Required |
Example |
Purpose |
DEFAULT_PROVIDER |
Yes |
gcp |
Selects LLM provider (gcp or siliconeflow). |
GCP_MODEL_URL |
Required when DEFAULT_PROVIDER=gcp |
https://.../generate |
GCP model endpoint for generation. |
SILICONEFLOW_API_KEY |
Required when DEFAULT_PROVIDER=siliconeflow |
sk-... |
SiliconeFlow auth token. |
SILICONEFLOW_URL |
Required when DEFAULT_PROVIDER=siliconeflow |
https://api.siliconeflow.com/v1/chat |
SiliconeFlow API URL. |
DATABASE_URL |
Recommended |
sqlite:///./data/shopmind.db |
Persistence backend (SQLite/Postgres). |
ALLOWED_ORIGINS |
Recommended |
https://shopmindai-backend.azurewebsites.net |
CORS policy. |
LOG_LEVEL |
No |
INFO |
Logging verbosity. |
MAX_RETRIEVE_DOCS |
No |
10 |
Retrieval count cap. |
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
curl -s http://localhost:8000/health
curl -s http://localhost:8000/metrics | head -n 20
- Create App Service (Linux, Python runtime).
- Deploy source from GitHub repo
fuaadabdullah/shopmind-ai.
- Set startup command:
uvicorn app.main:app --host 0.0.0.0 --port 8000
- Set required app settings (all secrets server-side only).
- Verify:
curl -s https://shopmindai-backend.azurewebsites.net/health
- Provider errors: verify provider env vars and credentials.
- 500 on diagnose: confirm database connectivity and provider endpoint reachability.
- CORS issues: verify
ALLOWED_ORIGINS includes frontend origin.