Nowhere to edit the variables?
Bug Description
Nowhere to edit the variables.
In docutment, it says:
TIP
You can also create global variables in Settings > Variables and Secrets.
But, actually, there is no such "Variables and Secrets" section.
Reproduction
- Create a flow.
- Check the Settings.
Expected behavior
There should be a "Variables and Secrets" section in Settings
Who can help?
No response
Operating System
Docker image v1.0.15
Langflow Version
v1.0.15
Python Version
None
Screenshot
No response
Flow File
No response
The "Variables and Secrets" section might not be present in the Settings as described in the documentation for Langflow v1.0.15 because the documentation contains a note indicating that the information may be outdated and will be updated as soon as possible [1].
However, you can manage global variables and secrets by configuring environment variables in your .env file. Set LANGFLOW_STORE_ENVIRONMENT_VARIABLES to true and list the variables in LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT [2][1].
For example:
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=VARIABLE1,VARIABLE2
This will make the specified environment variables accessible and manageable within the "Variables and Secrets" section, if it becomes available.
To continue talking to Dosu, mention @dosu.
I found that these variable exists in the langflow software's settings, this is a bit little weird.
And, still it's not editable. There is no value field.
How can I set a project level variable which can be exported with the project and modified when the project is imported somewhere else?
To set a project-level variable in Langflow that can be exported with the project and modified when the project is imported somewhere else, you can create a Global Variable. Here are the steps to do this:
- In a Text field, click the 🌐 button.
- Click + Add New Variable.
- Define the Name, Type, and Value of the variable.
- Click Save Variable to create it.
To ensure these variables are included when exporting and can be modified upon import, you can configure environment variables in your .env file:
- Set
LANGFLOW_STORE_ENVIRONMENT_VARIABLEStotruein your.envfile. - List the variables you want to include in
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENTas a comma-separated list or as a JSON-encoded string.
Example .env configuration:
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT="VARIABLE1, VARIABLE2"
or
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT='["VARIABLE1", "VARIABLE2"]'
This setup will ensure that the specified variables are included in the project's Global Variables and can be modified when the project is imported elsewhere. Additionally, you can manage these variables in Settings > Variables and Secrets [1][2][3].
To continue talking to Dosu, mention @dosu.
Currently, you can edit the global variables directly through the API. I believe that the frontend will soon support editing global variables as well.