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

docs: auto saving #3389

Merged
merged 8 commits into from
Aug 16, 2024
51 changes: 51 additions & 0 deletions docs/docs/Configuration/configuration-auto-saving.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Auto-saving
sidebar_position: 6
slug: /configuration-auto-save
---

Langflow currently supports both manual and auto-saving functionality.

## Auto-saving {#auto-saving}

When Langflow is in Auto-saving mode, all changes are saved automatically. Auto-save progress is indicated in the left side of the top bar: when a flow is being saved, a Loading icon indicates that the flow is being saved in the database.

![](./saving-header.png)

If you try to exit the flow page before auto-save completes, a dialog will appear to confirm you want to exit before the flow has saved.

![](./flow-saving.png)

When the flow has successfully saved, you can click the 'Exit' button.

![](./flow-saved.png)

## Manual Saving {#manual-saving}

When auto-saving is disabled, you need to manually save your flow when making changes. You can still run the flow without saving, for testing purposes.

If you make any changes and Langflow detects that the saved flow is different from the current flow, a Save button will be enabled and the last time saved will appear at the left side of the topbar. To save the flow, click the Save button, or hit Ctrl+S or Command+S.

![](./manual-save-button.png)

If you try to exit after making changes and not saving, a confirmation dialog will appear. You can choose to exit anyway or save and exit.

![](./flow-unsaved.png)

## Disable Auto Saving {#environment}

In Langflow, all changes made in the flows are saved automatically. However, you may prefer to disable this functionality, if you want a quick way to prototype and test changes before they are actually saved to the database.

If you wish to disable this functionality, you can run Langflow with an environment variable to tell Langflow to use manual saving.

```shell
langflow --no-auto-saving
# or
python -m langflow --no-auto-saving
```

If you installed the local version of Langflow, you can set an environment variable and load it automatically by inserting this line into the `.env` file inside the directory.

```env
LANGFLOW_AUTO_SAVING=false
```
81 changes: 21 additions & 60 deletions docs/docs/Configuration/configuration-cli.md

Large diffs are not rendered by default.

Binary file added docs/docs/Configuration/flow-saved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/Configuration/flow-saving.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/Configuration/flow-unsaved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/Configuration/manual-save-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/Configuration/saving-header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1853,15 +1853,10 @@
html-react-parser "^4.2.0"
posthog-js "^1.45.1"

"@node-rs/jieba-linux-x64-gnu@1.10.3":
"@node-rs/jieba-darwin-arm64@1.10.3":
version "1.10.3"
resolved "https://registry.npmjs.org/@node-rs/jieba-linux-x64-gnu/-/jieba-linux-x64-gnu-1.10.3.tgz"
integrity sha512-GF5cfvu/0wXO2fVX/XV3WYH/xEGWzMBvfqLhGiA1OA1xHIufnA1T7uU3ZXkyoNi5Bzf6dmxnwtE4CJL0nvhwjQ==

"@node-rs/jieba-linux-x64-musl@1.10.3":
version "1.10.3"
resolved "https://registry.npmjs.org/@node-rs/jieba-linux-x64-musl/-/jieba-linux-x64-musl-1.10.3.tgz"
integrity sha512-h45HMVU/hgzQ0saXNsK9fKlGdah1i1cXZULpB5vQRlRL2ZIaGp+ULtWTogS7vkoo2K8s2l4tqakWMg9eUjIJ2A==
resolved "https://registry.npmjs.org/@node-rs/jieba-darwin-arm64/-/jieba-darwin-arm64-1.10.3.tgz"
integrity sha512-dwPhkav1tEARskwPz91UUXL2NXy4h0lJYTuJzpGgwXxm552zBM2JJ41kjah1364j+EOq5At3NQvf5r5rH89phQ==

"@node-rs/jieba@^1.6.0":
version "1.10.3"
Expand Down Expand Up @@ -5602,6 +5597,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
Expand Down