## Description This Pull Request implements four new features in the langflow Workflow project: - Copy and Paste feature for multiple nodes - Undo and Redo feature for node actions ### Copy and Paste Feature The Copy and Paste feature allows users to select multiple nodes by holding down the `Shift` key and dragging the mouse over the nodes, copy them using the `Ctrl+C` keyboard shortcut, and paste them into a different location within the workflow by leaving the mouse pointer at the desired location and pressing `Ctrl+V`. ### Undo and Redo Feature The Undo and Redo feature allows users to undo and redo actions on the workflow nodes using the `Ctrl+Z` and `Ctrl+Shift+Z` keyboard shortcuts, respectively. When a user undoes an action, the state of the nodes in the workflow is reverted to the previous state. Similarly, when a user redoes an action, the state of the nodes is restored to the previous state that was undone. ## How to Test To test these features, follow the below steps: 1. Run the `langflow` application. 2. Add a few nodes to the workflow. 3. Select one or more nodes by holding down the `Shift` key and dragging the mouse over the nodes. 4. Press `Ctrl+C` to copy the selected nodes. 5. Leave the mouse pointer at a different location in the workflow and press `Ctrl+V` to paste the copied nodes. 6. Use the `Ctrl+Z` and `Ctrl+Shift+Z` keyboard shortcuts to undo and redo actions on the nodes in the workflow. |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| docker_example | ||
| img | ||
| scripts | ||
| src | ||
| tests | ||
| .gitignore | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| dev.Dockerfile | ||
| docker-compose.debug.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| GCP_DEPLOYMENT.md | ||
| LICENSE | ||
| Makefile | ||
| package-lock.json | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
⛓️ LangFlow
~ A User Interface For LangChain ~
LangFlow is a GUI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows with drag-and-drop components and a chat box.
📦 Installation
Locally
You can install LangFlow from pip:
pip install langflow
Next, run:
python -m langflow
or
langflow
Deploy Langflow on Google Cloud Platform
Follow our step-by-step guide to deploy Langflow on Google Cloud Platform (GCP) using Google Cloud Shell. The guide is available in the Langflow in Google Cloud Platform document.
Alternatively, click the "Open in Cloud Shell" button below to launch Google Cloud Shell, clone the Langflow repository, and start an interactive tutorial that will guide you through the process of setting up the necessary resources and deploying Langflow on your GCP project.
🎨 Creating Flows
Creating flows with LangFlow is easy. Simply drag sidebar components onto the canvas and connect them together to create your pipeline. LangFlow provides a range of LangChain components to choose from, including LLMs, prompt serializers, agents, and chains.
Explore by editing prompt parameters, link chains and agents, track an agent's thought process, and export your flow.
Once you're done, you can export your flow as a JSON file to use with LangChain. To do so, click the "Export" button in the top right corner of the canvas, then in Python, you can load the flow with:
from langflow import load_flow_from_json
flow = load_flow_from_json("path/to/flow.json")
# Now you can use it like any chain
flow("Hey, have you heard of LangFlow?")
👋 Contributing
We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our contributing guidelines and help make LangFlow more accessible.
📄 License
LangFlow is released under the MIT License. See the LICENSE file for details.