Skip to content

Commit 2daf3e9

Browse files
Use 'or' fallback for Langflow flow IDs
Switch LANGFLOW_* and NUDGES_FLOW_ID settings to use os.getenv(...) or <default> instead of os.getenv(..., <default>). This makes the code fall back to the hardcoded defaults when an environment variable is set to an empty string as well as when it's unset. Updated variables: LANGFLOW_CHAT_FLOW_ID, LANGFLOW_INGEST_FLOW_ID, LANGFLOW_URL_INGEST_FLOW_ID, NUDGES_FLOW_ID.
1 parent 5a766b5 commit 2daf3e9

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/config/settings.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,10 @@
3939
LANGFLOW_URL = os.getenv("LANGFLOW_URL", "http://localhost:7860")
4040
# Optional: public URL for browser links (e.g., http://localhost:7860)
4141
LANGFLOW_PUBLIC_URL = os.getenv("LANGFLOW_PUBLIC_URL")
42-
LANGFLOW_CHAT_FLOW_ID = os.getenv("LANGFLOW_CHAT_FLOW_ID", "1098eea1-6649-4e1d-aed1-b77249fb8dd0")
43-
LANGFLOW_INGEST_FLOW_ID = os.getenv(
44-
"LANGFLOW_INGEST_FLOW_ID", "5488df7c-b93f-4f87-a446-b67028bc0813"
45-
)
46-
LANGFLOW_URL_INGEST_FLOW_ID = os.getenv(
47-
"LANGFLOW_URL_INGEST_FLOW_ID", "72c3d17c-2dac-4a73-b48a-6518473d7830"
48-
)
49-
NUDGES_FLOW_ID = os.getenv("NUDGES_FLOW_ID", "ebc01d31-1976-46ce-a385-b0240327226c")
42+
LANGFLOW_CHAT_FLOW_ID = os.getenv("LANGFLOW_CHAT_FLOW_ID") or "1098eea1-6649-4e1d-aed1-b77249fb8dd0"
43+
LANGFLOW_INGEST_FLOW_ID = os.getenv("LANGFLOW_INGEST_FLOW_ID") or "5488df7c-b93f-4f87-a446-b67028bc0813"
44+
LANGFLOW_URL_INGEST_FLOW_ID = os.getenv("LANGFLOW_URL_INGEST_FLOW_ID") or "72c3d17c-2dac-4a73-b48a-6518473d7830"
45+
NUDGES_FLOW_ID = os.getenv("NUDGES_FLOW_ID") or "ebc01d31-1976-46ce-a385-b0240327226c"
5046

5147

5248
# Langflow superuser credentials for API key generation

0 commit comments

Comments
 (0)