This directory contains common code used in the statgpt.admin and statgpt.app applications.
Below are the common environment variables used in both applications: statgpt.admin and statgpt.app.
See Admin and Main App for
application-specific environment variables.
| Variable | Required | Description | Available Values | Default values |
|---|---|---|---|---|
| DIAL_URL | Yes | URL of the DIAL Core where the app is deployed | http://localhost:8080 |
|
| DIAL_API_KEY | Yes | API key for the DIAL Core with access to the required models and apps | ||
| PGVECTOR_HOST | Yes | Host of the postgres database with pgvector extension | ||
| PGVECTOR_PORT | Yes | Port of the postgres database | 5432 |
|
| PGVECTOR_DATABASE | Yes | Name of the postgres database | ||
| PGVECTOR_USER | Yes | User of the postgres database | ||
| PGVECTOR_PASSWORD | No | Password of the postgres database. Only required for non-MSI type authorization method. | ||
| PGVECTOR_USE_MSI | No | If enabled, the application uses MSI to authenticate to the database. Otherwise, it uses the password from the environment variable. | true, false |
false |
| PGVECTOR_MSI_SCOPE | No | The scope used to obtain the MSI token. | "https://ossrdbms-aad.database.windows.net/.default" |
|
| PGVECTOR_MSI_TOKEN_REFRESH_TIMEOUT | No | Delay between MSI token refreshes. | 23 * 3600 |
|
| PGVECTOR_CONNECTION_MAX_RETRIES | No | Maximum number of retries for the Postgres connection | 5 |
|
| PGVECTOR_CONNECTION_RETRY_INTERVAL | No | Initial retry interval in seconds (uses exponential backoff) | 10.0 |
|
| PGVECTOR_ADVISORY_LOCK_TIMEOUT | No | Timeout in seconds for acquiring pg_advisory_lock | 300 (5 minutes) |
|
| PGVECTOR_ALEMBIC_MAX_RETRIES | No | Maximum number of alembic version check retry attempts | 5 |
|
| PGVECTOR_ALEMBIC_RETRY_INTERVAL | No | Initial retry interval in seconds for alembic version check (uses exponential backoff) | 10.0 |
|
| ELASTIC_CONNECTION_STRING | No | Connection string for the ElasticSearch instance | ||
| ELASTIC_AUTH_USER | No | User for the ElasticSearch instance | ||
| ELASTIC_AUTH_PASSWORD | No | Password for the ElasticSearch instance | ||
| ELASTIC_TIMEOUT | No | Timeout for the ElasticSearch requests | 30 |
|
| ELASTIC_MAX_RETRIES | No | Maximum number of retries for the ElasticSearch requests | 3 |
|
| ELASTIC_RETRY_ON_TIMEOUT | No | Whether to retry requests on timeout | true, false |
true |
| ELASTIC_INDICATORS_INDEX | No | Index name for the indicators in the ElasticSearch instance | ||
| ELASTIC_MATCHING_INDEX | No | Index name for the matching in the ElasticSearch instance | ||
| LANGCHAIN_EMBEDDING_DEFAULT_MODEL | No | Default embeddings model | text-embedding-3-large |
|
| LANGCHAIN_DEFAULT_MODEL | No | Default language chain model | value of LLM_MODELS_GPT_4_1_2025_04_14 |
|
| LANGCHAIN_DEFAULT_TEMPERATURE | No | Default temperature for LLM models | 0 |
|
| LANGCHAIN_DEFAULT_API_VERSION | No | Default API version for LLM models access | 2024-08-01-preview |
|
| LANGCHAIN_DEFAULT_SEED | No | Default seed for LLM models | ||
| LANGCHAIN_VERBOSE | No | Whether to enable langchain.verbose mode | true, false |
false |
| LANGCHAIN_DEBUG | No | Whether to enable langchain.debug mode | true, false |
false |
| LANGCHAIN_USE_CUSTOM_LOGGER_CALLBACK | No | Whether to use a custom logger callback for langchain library | true, false |
false |
| LOG_FORMAT | No | Format of the logs | %(asctime)s [%(levelname)s] |%(process)d | %(pathname)s: %(message)s |
|
| LOG_LEVEL | No | Level of the logs | DEBUG, INFO, WARN, ERROR, CRITICAL |
INFO |
| LOG_LEVEL_DB | No | Level of the logs for the database library | DEBUG, INFO, WARN, ERROR, CRITICAL |
INFO |
| LOG_LEVEL_UVICORN | No | Level of the logs for the Uvicorn server | DEBUG, INFO, WARN, ERROR, CRITICAL |
INFO |
| LOG_LEVEL_OPENAI | No | Level of the logs for the OpenAI library | DEBUG, INFO, WARN, ERROR, CRITICAL |
WARNING |
| LOG_LEVEL_HTTPCORE | No | Level of the logs for the HTTPCore library | DEBUG, INFO, WARN, ERROR, CRITICAL |
WARNING |
| LOG_MULTILINE_MODE_ENABLED | No | Whether to enable multiline mode for logs | true, false |
false |
| SDMX_CACHE_DIR | No | Directory to store the SDMX cache files. SDMX Cache is designed to speed up the application startup for development. If set, the application will take some data (dataset definitions, available values, etc.) from existing files instead of querying the SDMX portal. | ||
| QUANTHUB_DATASET_CACHE_TTL | No | The time in seconds after which the QuantHub SDMX dataset cache is invalidated | 3600 |
|
| OAUTH2_TOKEN_ENDPOINT_URL | No | OAuth2 Token endpoint Url. Required if auth enabled | ||
| SERVICES_CHAT_SCOPE | No | Auth scope for the chat | ||
| SERVICES_CHAT_CLIENT_ID | No | Chat Client ID | ||
| SERVICES_CHAT_CLIENT_SECRET | No | Chat Client Secret | ||
| CLIENTS_SPA_CHAT_CLIENT_ID | No | Chat Client ID for SPA DIAL Chat | ||
| CLIENTS_SPA_CHAT_CLIENT_SECRET | No | Chat Client Secret for SPA DIAL Chat | ||
| LLM_MODELS_GPT_4_TURBO_2024_04_09 | No | GPT-4 Turbo 2024-04-09 deployment | gpt-4-turbo-2024-04-09 |
|
| LLM_MODELS_GPT_4_O_2024_05_13 | No | GPT-4 Omni 2024-04-09 deployment | gpt-4o-2024-05-13 |
|
| LLM_MODELS_GPT_4_O_2024_08_06 | No | GPT-4 Omni 2024-08-06 deployment | gpt-4o-2024-08-06 |
|
| LLM_MODELS_GPT_4_O_2024_11_20 | No | GPT-4 Omni 2024-11-20 deployment | gpt-4o-2024-11-20 |
|
| LLM_MODELS_GPT_4_O_MINI_2024_07_18 | No | GPT-4 Omni Mini 2024-07-18 deployment | gpt-4o-mini-2024-07-18 |
|
| LLM_MODELS_GPT_4_1_2025_04_14 | No | GPT-4.1 2025-04-14 deployment | gpt-4-1-2025-04-14 |
|
| LLM_MODELS_GPT_4_1_MINI_2025_04_14 | No | GPT-4.1 Mini 2025-04-14 deployment | gpt-4-1-mini-2025-04-14 |
|
| LLM_MODELS_GPT_4_1_NANO_2025_04_14 | No | GPT-4.1 Nano 2025-04-14 deployment | gpt-4-1-nano-2025-04-14 |
|
| LLM_MODELS_GEMINI_1_5_FLASH_001 | No | Gemini 1.5 Flash 001 deployment | gemini-1.5-flash-001 |
|
| LLM_MODELS_GEMINI_2_0_FLASH_LITE_001 | No | Gemini 2.0 Flash Lite 001 deployment | gemini-2.0-flash-lite-001 |
|
| HYBRID_INDEX_CONCURRENCY_LIMIT | No | Maximum concurrency of hybrid indexing | 20 | |
| DATAFLOW_LOADER_DATASET_CONCURRENCY_LIMIT | No | Maximum concurrency for dataset loading | 10 | |
| DATAFLOW_LOADER_CODE_LIST_CONCURRENCY_LIMIT | No | Maximum concurrency for code list loading | 10 | |
| DATAFLOW_LOADER_CONCEPT_SCHEME_CONCURRENCY_LIMIT | No | Maximum concurrency for concept scheme loading | 10 | |
| APP_MEMORY_DEBUG | No | Whether to enable memory debug mode, which provides more detailed information about memory operations. Should be disabled in production. | true, false |
false |
| APP_GC_DEBUG | No | Whether to enable garbage collection debug mode, which provides more detailed information about garbage collection operations. Should be disabled in production. | true, false |
false |