Commit graph

14,732 commits

Author SHA1 Message Date
Christophe Bornet
ddb53ab83d
fix: Put back some sync methods for backward compatibility. (#5269)
* Put back some sync methods for backward compatibility.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-16 14:18:16 +00:00
Cristhian Zanforlin Lousa
b50b6e2adb
fix: enhance confirmation modal with new UI properties (#5283)
 (nodeToolbarComponent/index.tsx): add new props 'cancelText', 'confirmationText', 'size', 'icon', and 'index' to enhance customization and functionality of the NodeToolbarComponent
2024-12-16 05:13:50 -08:00
Cristhian Zanforlin Lousa
d147a73c43
style: convert SVG attributes to React camelCase format (#5284)
📝 (AgentQL.jsx): Update attribute names from camelCase to PascalCase for consistency and better readability.
2024-12-16 05:12:09 -08:00
Jordan Frazier
ba6f5183be
ci: update docker image configuration for secure deployments (#5259)
* changes required for openshift to work with read-only dirs
2024-12-13 22:38:55 +00:00
Cristhian Zanforlin Lousa
977ba926c6
perf: Optimize component rendering with memoization and useCallback hooks (#5253)
*  (NodeDescription/index.tsx): Memoize Markdown component and description rendering for performance optimization
♻️ (NodeOutputfield/index.tsx): Memoize HandleRenderComponent and Handle instance with useMemo and memo for performance optimization
 (RenderInputParameters/index.tsx): Add new component RenderInputParameters to render input parameters with memoization for improved performance

📝 (GenericNode/index.tsx): Remove unused imports and functions, refactor sortToolModeFields to be exported, and optimize key generation and memoization for NodeOutputField component
📝 (flowSidebarComponent/index.tsx): Refactor event handlers to use useCallback for better performance
📝 (nodeToolbarComponent/index.tsx): Refactor event handlers to use useCallback for better performance and readability

* ♻️ (NodeDescription/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (NodeOutputfield/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (RenderInputParameters/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments

*  (decisionFlow.spec.ts): add @workflow tag to the test case for better categorization and organization.

* 📝 (GenericNode/index.tsx): Organize imports and update component import for better code structure and readability
📝 (GenericNode/index.tsx): Refactor renderOutputs function to improve code readability and maintainability
📝 (GenericNode/index.tsx): Refactor renderOutputParameter function to use OutputParameter component for consistency
📝 (GenericNode/index.tsx): Refactor output rendering logic to use OutputParameter component for better code structure
📝 (sidebarDraggableComponent/index.tsx): Update logic to remove cursor element only if it exists to prevent errors

*  (NodeOutputParameter/index.tsx): Add a new component for rendering output parameters in the frontend to improve modularity and reusability.
2024-12-13 22:24:45 +00:00
Cristhian Zanforlin Lousa
32a0707f9f
fix: simplify input field handling in InputListComponent (#5255)
* 🔧 (index.tsx): Remove unnecessary conditional rendering for addNewInput button and simplify the logic for onClick event handler to improve code readability and maintainability.

*  (button-input-list.tsx): Add a new component ButtonInputList to handle button input list functionality in the frontend
📝 (get-class-name.ts): Create a helper function getButtonClassName to generate button class names based on disabled state
📝 (get-test-id.ts): Create a helper function getTestId to generate unique test ids for input list buttons
🔄 (index.tsx): Refactor InputListComponent to use the new ButtonInputList component for handling button input list functionality in the frontend
2024-12-13 22:06:47 +00:00
Eric Hare
77a82d7cc5
fix: set embedding dict to empty if vectorize (#5258)
* fix: set embedding dict to empty if vectorize

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-13 20:25:47 +00:00
Eric Hare
b28c6dcc55
fix: support additional autodetect astradb params (#5254)
* fix: support additional autodetect astradb params

* [autofix.ci] apply automated fixes

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-13 16:23:43 -03:00
Sergey Ryabov
ee31f152ad
feat: Add AgentQL integration (#4998)
AgentQL is a query language and a set of supporting developer tools designed to identify web elements and their data using natural language and return them in the shape you define.
Added AgentQL data extraction component. See: https://docs.agentql.com/rest-api/api-reference

This pull request introduces a new component, AgentQL, to both the backend and frontend of the project. The changes include the implementation of the AgentQL component, its integration into the frontend, and the addition of a new icon for AgentQL.

* feat: Add AgentQL integration

* upd: Update the logo

* upd: Update field type

* upd: Address feedback + better error handling

* upd: Change DictInput type & mark 'advanced' fields

* upd: Update wording

* upd: Update wording

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2024-12-13 13:38:09 -05:00
Gabriel Luiz Freitas Almeida
f6d4c204da
ci: Update GitHub Actions workflow to include Python 3.13 (#5240)
* chore: add Python 3.13 to GitHub Actions workflow matrix

* chore: update GitHub Actions workflow to include Python 3.13 in the testing matrix

* Add Python 3.13 to nightly build test matrix
2024-12-13 17:28:42 +00:00
Gabriel Luiz Freitas Almeida
c40be15e9b
refactor: reduce logging of SQLite pragmas and enhance model provider type safety (#5235)
* feat: add ModelProvidersDict TypedDict and update MODEL_PROVIDERS_DICT type annotation

- Introduced ModelProvidersDict as a TypedDict to define the structure for model provider configurations.
- Updated MODEL_PROVIDERS_DICT to use the new TypedDict for improved type safety and clarity.
- Enhanced code readability and maintainability by specifying input types for model providers.

* fix: prevent duplicate logging of SQLite pragmas in DatabaseService

- Added a flag to track whether SQLite pragmas have been logged to avoid redundant log entries.
- Improved logging efficiency by ensuring that the debug message for setting pragmas is only logged once per session.
2024-12-13 14:20:55 +00:00
Christophe Bornet
384ac5e80e
ref: Add and use update_component_build_config utility (#5226)
* Add and use update_component_build_config utility

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 23:58:19 +00:00
Gabriel Luiz Freitas Almeida
5a4aef0f82
ci: Add nightly build status check and synchronize event to CI workflows (#5241)
* ci: add synchronize event to PR label workflow

* feat: add nightly build status check to CI workflow

* ci: rename job to 'Check Nightly Status' in CI workflow
2024-12-12 14:52:53 -08:00
Raphael Valdetaro
67892d4292
feat: add gemini-2.0-flash-exp and gemini-exp-1206 models (#5213) 2024-12-12 21:21:46 +00:00
Gabriel Luiz Freitas Almeida
222f15d8a1
fix: Ensure safe assignment to tool_blocks_map in agent_message handling (#5239)
fix: ensure tool_blocks_map assignment is safe by checking content availability in agent_message
2024-12-12 20:45:34 +00:00
Gabriel Luiz Freitas Almeida
c6b1eaba60
feat: add support for Python 3.13 (#5238)
* chore: update Python version requirement and remove deprecated dependencies in pyproject.toml files

* Updated Python version requirement to allow up to 3.14 in both main and base pyproject.toml files.
* Removed deprecated dependencies: cohere and pyautogen from the main dependencies list.

* chore: update Python version requirements and add support for Python 3.13 in uv.lock

* Updated the required Python version to allow up to 3.14.
* Adjusted resolution markers for Python versions to include 3.13.
* Added markers for the 'typing-extensions' dependency to restrict it for Python versions below 3.13.
* Included additional wheel files for various packages to support Python 3.13 compatibility.

* Update Python version requirements in README files to support Python 3.13

* Update Python version in GitHub Actions workflow to 3.13

* Update Python version in GitHub Actions workflows to include 3.13

* Update installation documentation to support Python 3.13 and clarify troubleshooting steps

* revert changes to docs until we release

* chore: add ag2 dependency and update uv.lock for Python 3.13 compatibility

* Added ag2 version 0.3.2 and 0.5.2 to pyproject.toml and uv.lock with appropriate resolution markers for Python versions.
* Included flaml version 2.3.2 in uv.lock to ensure compatibility with the new ag2 dependency.
* Updated dependency specifications to support Python 3.13 and above.
2024-12-12 12:24:43 -08:00
Cristhian Zanforlin Lousa
94fa92f718
fix: validateDOMNesting error on nodeToolbarComponent (#5212)
🐛 (use-patch-update-flow.ts): change 'locked' property to optional by using '?' to match interface definition
📝 (index.tsx): add 'asChild' prop to Button component to pass it down as a prop to the child component
2024-12-12 19:54:07 +00:00
Mendon Kissling
973ca8c780
Docs: recommend uv (#5237)
* docs: add troubleshooting section for Langflow installation issues

* docs: update installation instructions to recommend uv for local setup

* docs: update installation instructions to emphasize uv as the recommended method

* Update docs/docs/Get-Started/get-started-installation.md

Co-authored-by: Madhavan <msmygit@users.noreply.github.com>

---------

Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
2024-12-12 19:01:16 +00:00
Eric Hare
a17335e802
fix: Do a better job of mapping Langchain to LiteLLM (#5233) 2024-12-12 18:56:39 +00:00
anovazzi1
0531084e35
fix: Refactor JSON serialization in build_flow and log_vertex_build (#5189)
* refactor(langflow): Update JSON serialization in build_flow and log_vertex_build

* Refactor JSON serialization in build_flow and log_vertex_build functions

* Refactor JSON serialization in build_flow and log_vertex_build functions
2024-12-12 18:51:24 +00:00
Gabriel Luiz Freitas Almeida
2c0991f9cf
fix: make user_id variable valid and fix type signature in messages endpoints (#5236)
* fix: enhance user_id validation in CustomComponent to ensure correct UUID handling

* Added type checks for user_id to ensure it is either a string or a UUID before conversion.
* Improved error handling by raising TypeError for invalid user_id types.

* fix: update flow_id and session_id types to UUID in monitor endpoint

* fix: convert flow_id to UUID type before adding messages

* fix: convert flow_id string to UUID when storing message

* fix: update session_id type to string in get_messages endpoint for improved type consistency
2024-12-12 18:46:08 +00:00
Eric Hare
fc4d93a33d
fix: have defaults for the table schema (#5099) 2024-12-12 18:33:15 +00:00
Raphael Valdetaro
943bef1167
feat(component): implement directory component enhancements (#5012)
* feat: directory component enhancements

* [autofix.ci] apply automated fixes

* feat: update directory component implementation

* [autofix.ci] apply automated fixes

* feat(directory): add MultiselectInput for file types selection

* [autofix.ci] apply automated fixes

* Fix mypy issue

* Update directory.py

* fix: correct type annotation in DirectoryComponent to ensure list[Data] return type

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-12 10:23:07 -08:00
Christophe Bornet
2e19403660
ref: Make list_flows async (#5222)
* Make list_flows async

* Keep sync list_flows method for backward compatibility
2024-12-12 16:02:43 +00:00
AlexShadow3
d73bf214a8
feat: add README.FR.md for French speakers (#5232)
* Create README.FR.md

* Update README.FR.md

feat: add new readme (README.FR.md)

* Update README.FR.md

feat: add README.md for french people

* feat: add French README files

Modified README.FR.md
Add CONTRIBUTING.FR.md and CODE_OF_CONDUCT.FR.md

* fix: update README links

* Update README.zh_CN.md

* Create README.FR.md

* Update README.FR.md

feat: add new readme (README.FR.md)

* Update README.FR.md

feat: add README.md for french people

* feat: add French README files

Modified README.FR.md
Add CONTRIBUTING.FR.md and CODE_OF_CONDUCT.FR.md

* fix: update README links

* Update README.zh_CN.md

* Delete markdown files

---------

Co-authored-by: AlexandreBobis <alexandrebobis91@gmail.com>
2024-12-12 15:50:59 +00:00
Cristhian Zanforlin Lousa
3e099ac72e
fix: remove unused import and simplify key generation in SideBarFoldersButtonsComponent (#5227)
* ♻️ (index.tsx): Remove unused getRandomKeyByssmm function to clean up code and improve maintainability
📝 (index.tsx): Update key prop in SidebarMenuItem component to use index instead of getRandomKeyByssmm function for better performance and readability

* 📝 (select-options.tsx): Refactor SelectOptions component to improve readability and maintainability by restructuring the JSX elements and adding proper classNames
📝 (index.tsx): Introduce state for hoveredFolderId to track the currently hovered folder in the SideBarFoldersButtonsComponent for better user interaction and visual feedback. Update SidebarMenuItem to include onMouseEnter and onMouseLeave events to set and clear the hoveredFolderId state respectively. Update SidebarMenuButton className to conditionally apply background color based on the hoveredFolderId state.
2024-12-12 15:42:09 +00:00
Gabriel Luiz Freitas Almeida
71d83b4737
Revert "feat: add README.FR.md for French speakers" (#5231)
Revert "feat: add README.FR.md for French speakers (#5176)"

This reverts commit 6bd599eef3.
2024-12-12 07:29:15 -08:00
AlexShadow3
6bd599eef3
feat: add README.FR.md for French speakers (#5176)
* Create README.FR.md

* Update README.FR.md

feat: add new readme (README.FR.md)

* Update README.FR.md

feat: add README.md for french people

* feat: add French README files

Modified README.FR.md
Add CONTRIBUTING.FR.md and CODE_OF_CONDUCT.FR.md

* fix: update README links

* Update README.zh_CN.md

---------

Co-authored-by: AlexandreBobis <alexandrebobis91@gmail.com>
2024-12-12 15:14:43 +00:00
Cristhian Zanforlin Lousa
2e7a5cdd67
fix: improve UUID handling in custom component variables (#5230)
* 🐛 (custom_component.py): fix user_id assignment to convert it to UUID type for consistency and correctness

* [autofix.ci] apply automated fixes

* 🐛 (custom_component.py): fix potential bug by checking if self.user_id is a string before converting it to UUID

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 15:13:38 +00:00
Gabriel Luiz Freitas Almeida
3de42f4575
feat: Update SQLModel dependency and improve UUID handling (#4891)
* Update sqlmodel dependency to version 0.0.20 in pyproject.toml

* Handle UUID conversion for message IDs in memory update logic

* Refactor Alembic migrations to use `sa.inspect` and update GUID to Uuid type

* refactor: Change flow_id parameter type from str to uuid.UUID in graph building functions

* refactor: Ensure UUID handling for flow_id and user_id across various services and models

* refactor: improve UUID handling and graph caching for compatibility with sqlmodel 0.0.20

* fix: update message assertion in component events test

* chore: update sqlmodel dependency to version 0.0.22 in uv.lock and pyproject.toml

* fix: enhance flow_id validation to ensure valid UUID format in MessageBase model

* fix: add error handling for cache directory cleanup

* refactor: improve flow_id type handling in message storage

* refactor: enhance flow_id handling in message functions to support UUID type

* refactor: integrate Properties into message creation in component event tests

* update test durations

* fix: correct flow_id parameter in database query

* refactor: update session_id and flow_id parameters to support UUID type across message handling functions and models

* fix: handle message data update in SQLModel update method

* refactor: improve flow_id assignment in message update method to enhance UUID handling
2024-12-12 04:58:27 -08:00
Christophe Bornet
4cc336fa45
ref: Use async list_variables (#5224)
Use async list_variables
2024-12-12 12:28:32 +00:00
Dmitry
46c9d13657
docs: fix typos Update integrations-assemblyai.md (#5220) 2024-12-12 12:16:10 +00:00
Cristhian Zanforlin Lousa
262e3bd3cc
fix: use SecretStr get_secret_value for LMStudio API key handling (#5200)
* 🐛 (lmstudiomodel.py): fix issue with accessing secret value in api_key variable to prevent potential errors

* ♻️ (lmstudiomodel.py): refactor api_key assignment to simplify code and improve readability

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 12:08:04 +00:00
Phil Miesle
d1821cb466
ref: improving development environment and instructions (#5180)
* improving development environment and instructions

* minor edits as requested

* fix typo in  DEVELOPMENT.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2024-12-12 04:01:05 -08:00
Jordan Frazier
ba31d436c4
ci: script and workflow to update starter projects (#5195) 2024-12-12 02:48:55 +00:00
Mendon Kissling
9ead14896a
docs: composio component (#5111)
* docs: add integration guide for Composio with Langflow

* docs: update Composio integration guide with additional details and examples

* rewrite-to-use-gmail-tool

* docs: Update Composio integration documentation with tool usage examples

* docs: Clarify prerequisites for Composio integration documentation

* docs: Improve clarity and formatting in integrations-composio.md
2024-12-11 22:44:23 +00:00
Mendon Kissling
bf4bb9b4a5
Docs: update quickstart (#5207)
* docs: Update quickstart guide to include prerequisites and detailed steps for building a chatbot with vector RAG

* cleanup

* add-file-component

* component-type

* docs: Update prerequisites and instructions in quickstart guide

* Apply suggestions from code review

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2024-12-11 21:33:03 +00:00
Vinícios Batista da Silva
3f9dab912c
feat: Restructure Youtube Transcripts component (#5118)
* feat: Restructure Youtube Transcripts component

- Changed the return type of the `build_youtube_transcripts` method from `Data` to `Message`.
- Updated the output name from "Data" to "Transcription" to reflect the new return type.
- Modified the return statements in `build_youtube_transcripts` to return `Message` objects instead of `Data`.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* test(youtube-transcripts): enhance test stability by updating component ID and improving interaction checks

- Modified the component id in the test script to match the changes in the Youtube Transcripts component

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* fix: Fixed lint on line 180-181
Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-11 20:27:19 +00:00
Cristhian Zanforlin Lousa
32ab4452f9
fix: Update Search API component to latest version from Travel Planning Agents template (#5192)
updating travel plannig agent - search api component
2024-12-11 18:08:18 +00:00
Cristhian Zanforlin Lousa
5cc331c4bc
test: increase timeout in Market Research tests (#5208)
 (Market Research.spec.ts): Remove unused functions and imports to clean up the code and improve maintainability
🔧 (Market Research.spec.ts): Increase timeout for page.waitForSelector to prevent timeout issues during test execution
2024-12-11 18:01:57 +00:00
Christophe Bornet
abd3321677
ref: Make load_flow_from_json async (#5057)
* Make load_flow_from_json async

* Add back sync load_flow_from_json for backward compatibility
2024-12-11 17:53:33 +00:00
Cristhian Zanforlin Lousa
dfcb3a5b04
fix: Resolve DOM validation & React lifecycle warnings (#5205)
📝 (frontend): Update AlertDropdown component to use 'asChild' prop for PopoverTrigger
📝 (frontend): Refactor ShadTooltip component to use forwardRef and add displayName
📝 (frontend): Update AppHeaderComponent to remove unnecessary aria-hidden attribute
📝 (frontend): Refactor SelectOptions component to improve code structure and readability
📝 (frontend): Update SideBarFoldersButtonsComponent to add getRandomKeyByssmm function and improve code structure

📝 (AWS.jsx): Update fill color condition to use stringToBool function for props.isdark
📝 (index.tsx): Convert isdark value to string before passing it to SvgAWS component
📝 (AstraDB.jsx): Update fill color condition to use stringToBool function for props.isdark

 (icons): Convert 'isdark' variable to string to ensure consistent type
♻️ (icons): Refactor 'fill-rule' and 'clip-rule' attributes to 'fillRule' and 'clipRule' for consistency
♻️ (nvidia): Refactor 'enable-background' attribute to 'enableBackground' for consistency
♻️ (nvidia): Refactor 'fill' attribute to use 'stringToBool' function for consistent boolean conversion
📝 (utils): Add 'stringToBool' function to convert string to boolean for reusability
2024-12-11 17:48:12 +00:00
Cypher Pepe
db641e70f6
docs: fix typos in documentation files (#5202)
* typo components-custom-components.md

* typo configuration-api-keys.md

* typo guides-chat-memory.md

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2024-12-11 17:30:08 +00:00
Mendon Kissling
44a790c35a
docs: Swap pip and uv installation instructions in README and install (#5201)
docs: Swap pip and uv installation instructions in README and installation guide
2024-12-11 12:21:26 -05:00
anovazzi1
67abb679b3
fix: Refactor CSS class in newChatMessage component preventing wrong position of bullet points (#5206)
* refactor: Update CSS class in newChatMessage component
2024-12-11 16:42:30 +00:00
Christophe Bornet
4f5d7d93ad
fix: Add async aupdate_build_config to CustomComponent (#5181)
* Add async aupdate_build_config to CustomComponent

* Add test of backward compatibility
2024-12-11 16:25:15 +00:00
Eric Hare
a302a946f2
fix: Move crewai to root deps for now (#5204) 2024-12-11 08:15:03 -08:00
Christophe Bornet
624fa71709
feat: Activate sqlite blocking detection again (#5203)
Activate sqlite blocking detection again
2024-12-11 15:48:17 +00:00
anovazzi1
5c334a74b3
refactor: Add displayLoadingMessage flag to MessagesStoreType and adjust chat view layout (#5062)
* refactor: Adjust chat view layout for responsiveness

The code changes in this commit adjust the layout of the chat view component to improve responsiveness. Specifically, the CSS classes for the chat container and input container have been modified to make them responsive on different screen sizes. This ensures that the chat view is displayed properly on both desktop and mobile devices.

Refactoring the layout in this way enhances the user experience by making the chat view more accessible and user-friendly across different devices.

* [autofix.ci] apply automated fixes

* feat: Add displayLoadingMessage flag to MessagesStoreType

* feat: Add displayLoadingMessage flag to MessagesStoreType

* feat: Add useMessagesStore to flowStore for displaying loading message

* refactor: Adjust chat view layout for responsiveness and loading message display

* [autofix.ci] apply automated fixes
2024-12-11 14:04:55 +00:00
Christophe Bornet
5ee995e89d
ref: Fix some ruff preview rules (#5156)
Fix some ruff preview rules
2024-12-11 13:37:29 +00:00