OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
refactor: Cleanup envs examples and unused envs (#1556)
Mike Fortman8a532ca50431
diff --git a/.env.example b/.env.exampleindex d03e811bf..0f933bc48 100644--- a/.env.example+++ b/.env.example@@ -14,6 +14,8 @@ DEFAULT_DOCS_INGEST_SOURCE=url# URL used when DEFAULT_DOCS_INGEST_SOURCE=urlDEFAULT_DOCS_URL=https://www.openr.ag/+# How many levels deep to crawl when DEFAULT_DOCS_INGEST_SOURCE=url (default: 2)+# DEFAULT_DOCS_CRAWL_DEPTH=2# Check for newer OpenRAG docs and update knowledge on every startup.@@ -133,15 +135,32 @@ WATSONX_PROJECT_ID=LLM_PROVIDER=LLM_MODEL=+# OPTIONAL: Custom system prompt for the chat agent. Overrides the default prompt baked into the Langflow flow.+# SYSTEM_PROMPT=+# Embedding provider configuration. Providers can be "watsonx", "ibm" or "ollama".EMBEDDING_PROVIDER=EMBEDDING_MODEL=+# Knowledge ingestion tuning+# OPTIONAL: Document chunk size in tokens (default configured in Langflow flow)+# CHUNK_SIZE=+# OPTIONAL: Overlap between chunks in tokens (default configured in Langflow flow)+# CHUNK_OVERLAP=+# OPTIONAL: Enable OCR for scanned PDFs and images (default: false)+# OCR_ENABLED=false+# OPTIONAL: Generate text descriptions for images found in documents (default: false)+# PICTURE_DESCRIPTIONS_ENABLED=false+# Port Configuration# Change these values if you have port conflicts with other services on your system# Default ports: Frontend=3000, Langflow=7860FRONTEND_PORT=3000LANGFLOW_PORT=7860+# Internal URL the OpenRAG backend uses to communicate with Langflow.+# When running via docker-compose this is set automatically to http://langflow:7860.+# Override only when running the backend outside Docker or pointing at a remote Langflow instance.+# LANGFLOW_URL=http://localhost:7860# OPTIONAL url for openrag link to langflow in the UI# If you change LANGFLOW_PORT, also update LANGFLOW_PUBLIC_URL to match the new port (e.g., http://localhost:7861)LANGFLOW_PUBLIC_URL=@@ -149,6 +168,8 @@ LANGFLOW_PUBLIC_URL=# OPTIONAL: Override the full docling-serve URL (e.g., for remote instances)# If not set, auto-detects host and uses port 5001# DOCLING_SERVE_URL=http://my-docling-server:5001+# OPTIONAL: OCR engine used by docling for scanned documents. Options: "easyocr" (default), "tesseract", "tesseract_cli"+# DOCLING_OCR_ENGINE=easyocr# OPTIONAL: Override host for docling service (for special networking setups)# HOST_DOCKER_INTERNAL=host.containers.internal@@ -160,6 +181,15 @@ LANGFLOW_SUPERUSER_PASSWORD=LANGFLOW_NEW_USER_IS_ACTIVE=FalseLANGFLOW_ENABLE_SUPERUSER_CLI=False+# ─────────────────────────────────────────────────────────────────────────────+# Langflow Container Variables+# These variables are passed directly to the Langflow container by docker-compose.+# They are NOT read by the OpenRAG Python backend.+#+# Note: OPENSEARCH_URL is automatically constructed by docker-compose from+# LANGFLOW_OPENSEARCH_HOST and LANGFLOW_OPENSEARCH_PORT — do not set it manually.+# ─────────────────────────────────────────────────────────────────────────────+# Langfuse tracing (optional)# Get keys from https://cloud.langfuse.com or your self-hosted instanceLANGFUSE_SECRET_KEY=@@ -205,6 +235,12 @@ OPENRAG_VERSION=latest# OPENRAG_CONFIG_PATH=./config# OPENRAG_FLOWS_PATH=./flows# OPENRAG_FLOWS_BACKUP_PATH= # defaults to <OPENRAG_FLOWS_PATH>/backup+# Comma-separated list of host directories the TUI watches for documents to ingest.+# The TUI derives OPENRAG_DOCUMENTS_PATH (below) from the first entry for Docker's volume mount.+# OPENRAG_DOCUMENTS_PATHS=$HOME/.openrag/documents+#+# Single directory path mounted into the OpenRAG container by docker-compose.+# Set automatically by the TUI from OPENRAG_DOCUMENTS_PATHS; override only if running without the TUI.# OPENRAG_DOCUMENTS_PATH=./openrag-documents# Langflow Configurationdiff --git a/src/config/settings.py b/src/config/settings.pyindex 89b19a24d..59530aafa 100644--- a/src/config/settings.py+++ b/src/config/settings.py@@ -27,6 +27,7 @@ logger = get_logger(__name__)# Environment variablesOPENSEARCH_HOST = os.getenv("OPENSEARCH_HOST", "localhost")OPENSEARCH_PORT = get_env_int("OPENSEARCH_PORT", 9200)+OPENSEARCH_URL = f"https://{OPENSEARCH_HOST}:{OPENSEARCH_PORT}"# Optional: Langflow-specific OpenSearch endpointLANGFLOW_OPENSEARCH_HOST = os.getenv("LANGFLOW_OPENSEARCH_HOST", OPENSEARCH_HOST)@@ -37,18 +38,11 @@ OPENSEARCH_PASSWORD = os.getenv("OPENSEARCH_PASSWORD")LANGFLOW_URL = os.getenv("LANGFLOW_URL", "http://localhost:7860")# Optional: public URL for browser links (e.g., http://localhost:7860)LANGFLOW_PUBLIC_URL = os.getenv("LANGFLOW_PUBLIC_URL")-# Backwards compatible flow ID handling with deprecation warnings-_legacy_flow_id = os.getenv("FLOW_ID")--LANGFLOW_CHAT_FLOW_ID = os.getenv("LANGFLOW_CHAT_FLOW_ID") or _legacy_flow_id+LANGFLOW_CHAT_FLOW_ID = os.getenv("LANGFLOW_CHAT_FLOW_ID")LANGFLOW_INGEST_FLOW_ID = os.getenv("LANGFLOW_INGEST_FLOW_ID")LANGFLOW_URL_INGEST_FLOW_ID = os.getenv("LANGFLOW_URL_INGEST_FLOW_ID")NUDGES_FLOW_ID = os.getenv("NUDGES_FLOW_ID")-if _legacy_flow_id and not os.getenv("LANGFLOW_CHAT_FLOW_ID"):- logger.warning("FLOW_ID is deprecated. Please use LANGFLOW_CHAT_FLOW_ID instead")- LANGFLOW_CHAT_FLOW_ID = _legacy_flow_id-# Langflow superuser credentials for API key generationLANGFLOW_AUTO_LOGIN = os.getenv("LANGFLOW_AUTO_LOGIN", "False").lower() in ("true", "1", "yes")@@ -84,8 +78,6 @@ else:DOCLING_SERVE_URL = f"http://{DOCLING_HOST_IP}:5001"logger.info("Auto-detected Docling host: %s (URL: %s)", DOCLING_HOST_IP, DOCLING_SERVE_URL)-IBM_AUTH_ENABLED = os.getenv("IBM_AUTH_ENABLED", "false").lower() in ("true", "1", "yes")-# Ingestion configurationDISABLE_INGEST_WITH_LANGFLOW = os.getenv("DISABLE_INGEST_WITH_LANGFLOW", "false"