Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default global variables aren't added when LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT is set #4190

Closed
eric-schneider opened this issue Oct 17, 2024 · 0 comments · Fixed by #4211
Assignees
Labels
bug Something isn't working

Comments

@eric-schneider
Copy link
Collaborator

Bug Description

If you define a default global variable (constants.py) as well as LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT in the same .env file, the default global variable is ignored.

Reproduction

  1. Create a .env file with the following contents:
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=VARIABLE1
OPENAI_API_KEY=test
  1. Start Langflow:
VARIABLE1="VALUE1" python -m langflow run --env-file .env
  1. Go to Settings > Environment Variables, and notice only VARIABLE1 is added.

  2. Comment out LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT in the .env file:

# LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=VARIABLE1
OPENAI_API_KEY=test
  1. Restart Langflow.

  2. Go to Settings > Environment Variables, and notice that OPENAI_API_KEY is added.

Expected behavior

I expected Langflow to honor both the default global variables as well as the custom global variables that I've defined in LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT.

Who can help?

@Italo

Operating System

macOS 14.7, Docker

Langflow Version

1.0.19

Python Version

3.11

Screenshot

No response

Flow File

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants