langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
35.27k stars 4.2k forks source link

Feature to export flows as vector images #3746

Open keelezibel opened 2 months ago

keelezibel commented 2 months ago

Feature Request

Right now, the canvas allows users to export flows as json. But it is hard to visualize the flows unless we import them into Langflow. It will be good to allow exports of various types possibly support for svg so that it can be included for reference outside of Langflow.

Motivation

Visualization of flows outside of Langflow. Current JSON format is not possible to visualize.

Your Contribution

No response

dosubot[bot] commented 2 months ago

Hey @keelezibel! I'm here to help you with bugs, questions, and becoming a contributor. Let me know how I can assist you while you wait for a human maintainer.

Currently, Langflow does not have built-in components or utilities specifically for exporting flows as SVG or other vector graphic formats. The existing export functionality primarily supports JSON format for flow data [1][2].

To implement this feature, you would need to extend the current export functionality to include SVG generation. This could involve:

  1. Creating a new utility function to convert the flow data into an SVG format.
  2. Integrating this function into the existing export modal or creating a new export option for SVG.

You might consider using libraries like d3.js or svg.js for generating SVGs from the flow data. This would allow users to visualize the flows outside of Langflow more easily.

To continue talking to Dosu, mention @dosu.