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

Nowhere to edit the variables? #3462

Closed
maxpaynebupt opened this issue Aug 21, 2024 · 4 comments
Closed

Nowhere to edit the variables? #3462

maxpaynebupt opened this issue Aug 21, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@maxpaynebupt
Copy link
Contributor

Bug Description

Nowhere to edit the variables.
In docutment, it says:
TIP
You can also create global variables in Settings > Variables and Secrets.
image

But, actually, there is no such "Variables and Secrets" section.

image

Reproduction

  1. Create a flow.
  2. 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

@maxpaynebupt maxpaynebupt added the bug Something isn't working label Aug 21, 2024
Copy link

dosubot bot commented Aug 21, 2024

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.

@maxpaynebupt
Copy link
Contributor Author

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.
image

How can I set a project level variable which can be exported with the project and modified when the project is imported somewhere else?

Copy link

dosubot bot commented Aug 21, 2024

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:

  1. In a Text field, click the 🌐 button.
  2. Click + Add New Variable.
  3. Define the Name, Type, and Value of the variable.
  4. 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:

  1. Set LANGFLOW_STORE_ENVIRONMENT_VARIABLES to true in your .env file.
  2. List the variables you want to include in LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT as 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.

@italojohnny italojohnny added enhancement New feature or request and removed bug Something isn't working labels Aug 21, 2024
@italojohnny italojohnny assigned anovazzi1 and unassigned italojohnny Aug 21, 2024
@italojohnny
Copy link
Member

Currently, you can edit the global variables directly through the API. I believe that the frontend will soon support editing global variables as well.
Untitled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants