Langflow is a powerful tool for building and deploying AI-powered agents and workflows. http://www.langflow.org
Find a file
Deon Sanchez a06cca4a8c
feat: add dialog support to dropdown components and enhance AstraDB (#5349)
* feat: add dialog support to dropdown components and enhance AstraDB integration

- Introduced a new NodeDialog component for improved user interaction when connecting to Astra DB.
- Updated AstraDBVectorStoreComponent to include a dialog option for creating new collections.
- Enhanced dropdown components to support dialog functionality, allowing users to create new options directly from the dropdown.
- Added `hasDialog` property to relevant component types to manage dialog visibility.
- Refactored utility functions to support new naming conventions and improve code clarity.

* [autofix.ci] apply automated fixes

* Remove creation parameters, add new inputs for dialog

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update the mixins for dialog_inputs

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* refactor: standardize JSON formatting and clean up input types in Vector Store RAG configuration

- Reformatted JSON structure for better readability, ensuring consistent indentation and line breaks.
- Updated input types across various components to use array notation for clarity.
- Removed extraneous entries in package-lock.json to streamline dependencies.
- Enhanced overall maintainability of the configuration files.

* Add new options_metadata field to dropdown mixin

* Update test_astra_component.py

* Properly set dictionary mapping

* Update astradb.py

* Fix collection loading

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Enhance AstraDB integration and update dropdown components

- Updated the AstraDBVectorStoreComponent to include new input fields for database and collection creation, with default options for selection.
- Refactored dropdown components to support dynamic dialog inputs, improving user interaction for creating new options and refreshing lists.
- Updated package-lock.json to reflect dependency upgrades, including Rollup and SWC packages.

This commit improves the functionality and usability of the AstraDB integration and dropdown components, ensuring a smoother user experience.

* Update astradb.py

* Fix autodetection

* Enhance dropdown components to support options metadata

- Added `optionsMetaData` prop to Dropdown and DropdownComponent for improved data handling.
- Updated rendering logic in Dropdown to display metadata alongside options, enhancing user experience.
- Modified type definitions to include `optionsMetaData` in relevant components.

These changes improve the flexibility and usability of dropdown components, allowing for richer data presentation.

* Refactor and enhance AstraDB integration and dropdown components

- Updated the `Vector Store RAG.json` configuration for improved formatting and consistency in output and input types.
- Enhanced the `NodeDialogComponent` to accept `dialogInputs` as a prop, allowing for more dynamic content rendering.
- Modified the `Dropdown` component to use `onSelect` instead of `onClick` for better accessibility and user interaction.
- Improved rendering logic in the `Dropdown` component to conditionally display icon options based on the presence of `dialogInputs`.

These changes enhance the usability and flexibility of the AstraDB integration and dropdown components, providing a more intuitive user experience.

* Don't inherit from dict input in new inputs

* [autofix.ci] apply automated fixes

* Update astradb.py

* update logic for dropdown

* Fix the number of records per collection

* Update astradb.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* feat: Enhance Dropdown and Parameter Render Components

- Updated Dropdown component to integrate post template value handling and refresh functionality.
- Refactored ParameterRenderComponent to conditionally render based on dialog inputs.
- Improved DropdownComponent to accept additional props for better flexibility.

These changes improve the overall functionality and usability of the dropdown components within the application.

* Set unknown to none to hide unavailable fields

* Update astradb.py

* Refactor Dropdown Component for Enhanced Usability

- Removed unnecessary state initialization and improved code readability.
- Updated button elements within the dropdown to enhance user interaction.
- Added loading state indication for the refresh button.
- Filtered out null values from options metadata for cleaner rendering.

These changes streamline the dropdown functionality and improve the user experience.

* Refactor NodeDialog, Dropdown, and ParameterRender Components

- Commented out debug logs in NodeDialogComponent to clean up console output.
- Enhanced Dropdown component to conditionally render icon options based on dialog inputs.
- Updated ParameterRenderComponent to check for the length of dialog inputs before rendering.

These changes improve code readability and ensure components behave correctly based on input conditions.

* [autofix.ci] apply automated fixes

* Cleanup some tests

* Fix ruff style issue

* [autofix.ci] apply automated fixes

* Fix environment specification

* [autofix.ci] apply automated fixes

* Update starter project template

* Update astradb.py

* Remove backwards compatibility features

* [autofix.ci] apply automated fixes

* Small tweak to autodetect

* [autofix.ci] apply automated fixes

* Refactor NodeDialogComponent to Dynamically Render Inputs

- Replaced static content in NodeDialogComponent with dynamic rendering based on dialogInputs.
- Introduced NodeInputField and RenderInputParameters components for better modularity.
- Enhanced footer with Cancel and Save buttons, improving user interaction.

These changes enhance the flexibility and usability of the NodeDialogComponent, allowing it to adapt to varying input configurations.

* Refactor NodeDialogComponent: Remove Unused Imports

- Commented out unused imports in NodeDialogComponent to clean up the code.
- This change enhances code readability and prepares the component for future updates.

No functional changes were made; the focus was on improving code quality.

* Refactor Dropdown and ParameterRender Components for Improved Readability and Functionality

- Renamed functions in Dropdown component for clarity: `renderOptionsList` and `renderCreateOptionDialog` to `oldRenderOptionsList` and `renderCustomOptionDialog`, respectively.
- Enhanced the rendering logic in Dropdown to streamline the display of options and metadata.
- Simplified the return structure in ParameterRenderComponent to always render the RefreshParameterComponent, improving code consistency.
- Updated RefreshParameterComponent to conditionally display the refresh button based on the presence of dialog inputs.

These changes improve code readability and maintainability while ensuring consistent behavior across components.

* [autofix.ci] apply automated fixes

* Add the new naming conventions to deletion fields

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Add new cloud provider options for database creation

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Make dialog inputs a dictionary of inputs

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update astradb.py

* [autofix.ci] apply automated fixes

* added mock data for testing

* Clean up the reactive flow

* [autofix.ci] apply automated fixes

* Fix the dialog inputs

* Update Vector Store RAG.json

* Update Vector Store RAG.json

* Update astradb.py

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* Switch dialog inputs from list to dictionary

* Update astradb.py

* Refactor NodeDialogComponent to utilize useDialogSubmit hook for handling dialog submissions and streamline input rendering. Remove unused props and mock data, enhancing clarity and maintainability. Update DropdownComponent to remove unnecessary content prop. Introduce useDialogSubmit hook for improved API interaction and loading state management.

* New structure for dialog inputs

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* No need for the input type on token

* Flip order of ingest and search

* [autofix.ci] apply automated fixes

* Remove id field from factory

* Remove other id field

* [autofix.ci] apply automated fixes

* Refactor directory_reader.py to simplify file filtering logic

* Refactor flowSidebarComponent to filter out bundles and custom components in CategoryGroup

* [autofix.ci] apply automated fixes

* Refactor NodeDialogComponent to utilize dialogInputs directly, removing mock data and enhancing parameter rendering. Update Dropdown and ParameterRenderComponent types to accept single dialogInputs object. Remove unused useDialogSubmit hook.

*  (NodeDialogComponent/index.tsx): Introduce handleNewValue function to handle updating node template values based on user input
🔧 (NodeDialogComponent/index.tsx): Add support for process.env.PORT environment variable to be able to run app on a configurable port
🔧 (dropdownComponent/index.tsx): Add nodeId prop to Dropdown component to pass node id for better context
🔧 (parameterRenderComponent/index.tsx): Update handleOnNewValue prop to accept key parameter for better handling of new values
🔧 (parameterRenderComponent/types.ts): Add nodeId property to BaseInputProps type for better context and consistency

* Don't load the new collection names from db

* Update astradb.py

* Temporary disabling of dialog inputs functionality

* Update directory_reader.py

* Fix problematic uv.lock line

* Update uv.lock

* Update Vector Store RAG.json

* Update Vector Store RAG.json

* refactor: enhance dropdown and refresh button logic for better user experience

- Updated the dropdown component to disable the trigger button when there are no options available or when certain conditions are met.
- Removed the old render options list to streamline the dropdown rendering process.
- Improved the loading state handling in the dropdown to provide clearer feedback to users.
- Refactored the refresh button logic to ensure it only displays when appropriate conditions are met, enhancing the component's responsiveness.

* [autofix.ci] apply automated fixes

* Allow combobox specification of api endpoint

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* Add back api_endpoint option for compatibility

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-01-21 19:43:54 +00:00
.devcontainer ref: improving development environment and instructions (#5180) 2024-12-12 04:01:05 -08:00
.github ci: adds verbosity to the backend unit tests output (#5775) 2025-01-19 23:21:24 +00:00
.vscode chore: Add backend installation tasks to VSCode configuration (#4335) 2024-10-31 14:51:01 +00:00
deploy fix: fix docker compose and add instructions (#2654) 2024-07-12 09:27:13 -07:00
docker refactor: run upgrade in dockerfiles to update dependencies (#5508) 2025-01-02 15:49:41 +00:00
docker_example chore: Use expose instead of ports in docker compose example (#5592) 2025-01-08 16:43:14 +00:00
docs chore: Upgrade langflow-embedded-chat to v1.0.7 (#5843) 2025-01-21 18:03:45 +00:00
scripts feat: Bump ruff version to 0.9 (#5666) 2025-01-15 15:14:43 +00:00
src feat: add dialog support to dropdown components and enhance AstraDB (#5349) 2025-01-21 19:43:54 +00:00
test-results feat: Flow's canvas actions design uplift (#4260) 2024-10-31 00:51:33 +00:00
.env.example fixing ThreadingInMemoryCache usage (#2604) 2024-07-10 04:52:37 -07:00
.eslintrc.json 🔧 (.pre-commit-config.yaml): Add eslint@9.1.1 as a dependency and enable autofix for pretty-format-json hook 2024-05-02 19:27:40 -03:00
.gitattributes Merge cz/mergeAll to two_edges 2024-06-10 11:31:02 -03:00
.gitignore refactor: Improve error messaging for missing message fields in memory module (#4779) 2024-11-23 13:04:20 +00:00
.pre-commit-config.yaml feat: return variable value if it is a generic variable (#5366) 2024-12-19 17:04:00 +00:00
CODE_OF_CONDUCT.md run codespell 2024-06-04 09:26:13 -03:00
CONTRIBUTING.md fix: fix typo in CONTRIBUTING.md (#5556) 2025-01-20 12:59:56 +00:00
DEVELOPMENT.md fix: fix typo Update DEVELOPMENT.md (#5558) 2025-01-20 12:43:29 +00:00
eslint.config.js 🔧 (.pre-commit-config.yaml): Add eslint@9.1.1 as a dependency and enable autofix for pretty-format-json hook 2024-05-02 19:27:40 -03:00
LICENSE Update organization name and URLs in configuration files 2024-04-18 11:58:19 -03:00
Makefile fix: adjust path to run only unit tests (#5184) 2025-01-08 13:40:08 +00:00
pyproject.toml feat: update duckduckgo search component version (#5818) 2025-01-20 20:06:12 +00:00
README.ES.md feat: add README.FR.md for French speakers (#5232) 2024-12-12 15:50:59 +00:00
README.FR.md feat: add README.FR.md for French speakers (#5232) 2024-12-12 15:50:59 +00:00
README.ja.md feat: add README.FR.md for French speakers (#5232) 2024-12-12 15:50:59 +00:00
README.KR.md feat: add README.FR.md for French speakers (#5232) 2024-12-12 15:50:59 +00:00
README.md feat(groq): added llama 3.3 models (#5497) 2025-01-20 13:01:19 +00:00
README.PT.md feat: add README.FR.md for French speakers (#5232) 2024-12-12 15:50:59 +00:00
README.zh_CN.md feat: add README.FR.md for French speakers (#5232) 2024-12-12 15:50:59 +00:00
render.yaml docs: fix render deployment and docs (#3309) 2024-08-14 03:45:56 -07:00
uv.lock feat: add dialog support to dropdown components and enhance AstraDB (#5349) 2025-01-21 19:43:54 +00:00

Langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. Its Python-based and agnostic to any model, API, or database.

Docs - Free Cloud Service - Self Managed

README in English README in Portuguese README in Spanish README in Simplified Chinese README in Japanese README in KOREAN README in French

Core features

  1. Python-based and agnostic to models, APIs, data sources, or databases.
  2. Visual IDE for drag-and-drop building and testing of workflows.
  3. Playground to immediately test and iterate workflows with step-by-step control.
  4. Multi-agent orchestration and conversation management and retrieval.
  5. Free cloud service to get started in minutes with no setup.
  6. Publish as an API or export as a Python application.
  7. Observability with LangSmith, LangFuse, or LangWatch integration.
  8. Enterprise-grade security and scalability with free DataStax Langflow cloud service.
  9. Customize workflows or create flows entirely just using Python.
  10. Ecosystem integrations as reusable components for any model, API or database.

Integrations

📦 Quickstart

  • Install with uv (recommended) (Python 3.10 to 3.12):
uv pip install langflow
  • Install with pip (Python 3.10 to 3.12):
pip install langflow

Getting Started

Stay up-to-date

Star Langflow on GitHub to be instantly notified of new releases.

Star Langflow

👋 Contribute

We welcome contributions from developers of all levels. If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.


Star History Chart

❤️ Contributors

langflow contributors