Commit graph

15,159 commits

Author SHA1 Message Date
brian-ogrady
8bf7048485
feat: Restructure Rerankers so both NVIDIA and Cohere work properly (#5933)
* Removing reference to nonexistent method

* Restructuring rerankers to inherit from BaseDocumentCompressor. Adding Voyage AI reranker.

* Removing Voyage AI component and dependency.

* [autofix.ci] apply automated fixes

* feat: Add method to compress documents as DataFrame in LCCompressorComponent

* Changing description of abstract build_compressor method

* [autofix.ci] apply automated fixes

* Adding top_n as an argument to the NVIDIA reranker

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-05 18:29:29 +00:00
Mendon Kissling
8ab74e037a
docs: Add usage guide for MCP stdio and SSE components (#6133)
* docs: Add usage guide for MCP stdio and SSE components

* docs: Remove example URL for MCP SSE component
2025-02-05 18:24:52 +00:00
Mendon Kissling
7e99dab42e
docs: API for v113 (#6093)
* bump-openapi-doc

* docs: Update API Reference documentation with comprehensive examples and explanations

* docs: Update API Reference documentation with consistent curl command formatting

* configure-build

* docs: Improve API reference documentation clarity for flow execution endpoint

* run-result

* webhook-data

* updates-to-stream-and-run

* bump-api-to-114

* note-on-streaming-responses

* Apply suggestions from code review

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

* fix-broken-link-in-report

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-02-05 17:28:08 +00:00
Mendon Kissling
37a56b106f
docs: webhook component playground test (#6053)
* webhook-component-test

* add-api-pane-pointer
2025-02-05 15:37:45 +00:00
Cristhian Zanforlin Lousa
8531e1b58d
feat: Update node name and description UX editing (#5920)
*  (NodeName/index.tsx): add cursor-grab class to improve user experience when dragging the node
 (NodeName/index.tsx): add nodrag class to prevent text selection when dragging the node
 (NodeStatus/index.tsx): add nodrag class to prevent text selection when dragging the node
 (GenericNode/index.tsx): add nopan, nodelete, nodrag, noflow classes to improve node dragging behavior

* 📝 (NodeDescription/index.tsx): Update cursor style to 'auto' for better user experience
📝 (NodeName/index.tsx): Update cursor style to 'auto' for better user experience
📝 (NodeOutputfield/index.tsx): Add cursor style 'pointer' to improve interactivity

*  (NodeDescription/index.tsx): Add support for editing node description when selected and editNameDescription is true
 (NodeName/index.tsx): Add support for editing node name when selected and editNameDescription is true
🔧 (GenericNode/index.tsx): Introduce useAlternate hook to handle toggling editNameDescription state
📝 (use-alternate.tsx): Add custom hook useAlternate to handle toggling boolean state
🔧 (style/index.css): Add new CSS variable --zinc-foreground for styling purposes
🔧 (tailwind.config.mjs): Add new tailwind color variable "zinc-foreground" for styling purposes

* 📝 (NodeDescription/index.tsx): Remove unnecessary setInputDescription call and update useEffect dependencies for better performance
📝 (NodeDescription/index.tsx): Update className for Textarea component to improve styling and readability
📝 (NodeDescription/index.tsx): Update className for generic-node-desc-text to improve styling and cursor behavior
📝 (NodeName/index.tsx): Remove unnecessary setInputName call and update useEffect dependencies for better performance
📝 (NodeName/index.tsx): Update className for span element to improve cursor behavior and styling
📝 (GenericNode/index.tsx): Add useRef for node element and implement useChangeOnUnfocus hook for better handling of focus events
📝 (GenericNode/index.tsx): Update className for pencil icon based on editNameDescription state for better visual feedback
📝 (GenericNode/index.tsx): Add editNameDescription to dependencies of useCallback to prevent unnecessary re-renders
📝 (GenericNode/index.tsx): Add editNameDescription to dependencies of useEffect to handle changes in editNameDescription state
📝 (use-change-on-unfocus.tsx): Implement custom hook useChangeOnUnfocus for handling focus events and state changes

* Refactor NodeDescription to remove old logic and variables

* Refactor NodeName component to remove unnecessary logic and variables

* [autofix.ci] apply automated fixes

*  (NodeDescription/index.tsx): Add functionality to edit node description and handle events like blur, key down, and double click for sticky notes
📝 (NoteNode/index.tsx): Introduce useAlternate hook to toggle edit mode for node description in NoteNode component

* ♻️ (NoteNode/index.tsx): refactor useAlternate hook usage to simplify code and improve readability

* 🔧 (GenericNode/index.tsx): refactor className to conditionally apply translate-x styles based on showNode state for improved UI responsiveness

* 📝 (NodeDescription/index.tsx): Refactor handleBlurFn and handleKeyDownFn to improve code readability and maintainability
📝 (NodeName/index.tsx): Refactor handleBlur and handleKeyDown functions for better code organization and readability
📝 (GenericNode/index.tsx): Update toggleEditNameDescription prop to setEditNameDescription for consistency and clarity
📝 (use-change-on-unfocus.tsx): Remove unnecessary handleEscape function and handleBlur event listener for better code simplicity and performance

* 📝 (NodeDescription/index.tsx): Update CSS class name to use 'focus-border-primary' instead of 'focus-border-black' for consistency and clarity
📝 (GenericNode/index.tsx): Add data-testid attribute to save and edit name description buttons for testing purposes
📝 (edit-name-description-node.spec.ts): Add test to verify user can edit name and description of a node in the UI

*  (GenericNode/index.tsx): Add functionality to show and hide toolbar with animation based on node selection status
📝 (get-class-toolbar-transform.ts): Create helper function to determine transform classes for toolbar animation based on showToolbar and showNode status

*  (NodeDescription/index.tsx): add setHasChangedNodeDescription prop to update parent component when node description changes
 (NodeName/index.tsx): add setHasChangedNodeDescription prop to update parent component when node name changes
 (GenericNode/index.tsx): add hasChangedNodeDescription state and setHasChangedNodeDescription function to track changes in node description and update parent component
📝 (edit-name-description-node.spec.ts): add wait for sidebar custom component button and timeout to improve test reliability

*  (group.spec.ts): Update click event on "title-Group" element to improve user interaction
🐛 (group.spec.ts): Fix click event on "save-name-description-button" element to properly save changes
🐛 (general-bugs-save-changes-on-node.spec.ts): Increase timeout for selectors to prevent test failures due to slow loading
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix random value generation to ensure consistent length
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix click event on "add-component-button-text-output" element to add component correctly
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix timeout for selector to prevent test failures due to slow loading
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix verifyTextareaValue function to properly verify textarea values

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-05 14:02:57 +00:00
Cristhian Zanforlin Lousa
6b17240d75
feat: resolve component update notification state persistence after dismissal (#6032)
*  (NodeStatus): Add support for utility store in NodeStatus component to manage dismissAll state
🔧 (GenericNode): Import and use utility store in GenericNode component to access dismissAll state
🔧 (use-reset-dismiss-update-all): Create hook to reset dismissAll state in utility store
🔧 (UpdateAllComponents): Import and use utility store in UpdateAllComponents component to access dismissAll state
🔧 (header): Import useResetDismissUpdateAll hook in header component to reset dismissAll state
🔧 (list): Import useResetDismissUpdateAll hook in list component to reset dismissAll state
🔧 (utilityStore): Add dismissAll state and setDismissAll method to utility store
🔧 (utility/index): Add dismissAll state and setDismissAll method to UtilityStoreType

*  (NodeStatus/index.tsx): add dismissAll prop to NodeStatus component to handle dismissing all notifications
 (GenericNode/index.tsx): add dismissAll prop to GenericNode component to handle dismissing all notifications
 (UpdateAllComponents/index.tsx): add e.stopPropagation() to onClick event handler to prevent event bubbling
🔧 (header/index.tsx): remove unused import useResetDismissUpdateAll from header component

*  (NodeStatus/index.tsx): Add functionality to handle updating a component when it is outdated and not user-edited
🔧 (GenericNode/index.tsx): Update handleUpdateComponent function to handleUpdateCode for consistency
🔧 (appHeaderComponent/index.tsx): Add useResetDismissUpdateAll hook to reset dismiss update all functionality
🔧 (use-reset-dismiss-update-all.ts): Update useResetDismissUpdateAll hook to only reset dismiss update all in flow location path
🔧 (list/index.tsx): Remove useResetDismissUpdateAll hook from ListComponent as it is no longer needed
🔧 (index.css): Remove extra whitespace in CSS file

* 🔧 (GenericNode/index.tsx): improve conditional class logic to include dismissAll variable in className calculation

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-02-05 12:49:58 +00:00
Mendon Kissling
369b8ec855
chore(deps): upgrade Docusaurus and related dependencies (#6120)
chore(deps): upgrade Docusaurus and related dependencies to version 3.7.0
2025-02-05 12:33:32 +00:00
anovazzi1
6cb7fa313f
chore: Bump version to 1.1.4 for langflow and 0.1.4 for langflow-base (#6119) 2025-02-04 18:23:44 -03:00
Gabriel Luiz Freitas Almeida
bdda781461
fix: Implement get_or_create_default_folder for user folder management (#6090)
* feat: implement get_or_create_default_folder function to ensure default folder exists for users

* refactor: replace create_default_folder_if_it_doesnt_exist with get_or_create_default_folder for user folder creation

* test: add unit tests for get_or_create_default_folder function

*  (generalBugs-shard-10.spec.ts): refactor test script to improve readability and maintainability by chaining actions on page elements instead of using separate lines for each action

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-02-03 18:34:58 +00:00
Mendon Kissling
ea5806f30e
docs: add guide for rotating LANGFLOW_SECRET_KEY (#6091)
docs: Add guide for rotating LANGFLOW_SECRET_KEY
2025-02-03 16:27:28 +00:00
Gabriel Luiz Freitas Almeida
f8b08a446c
refactor: Enhance profile picture copying with optimized I/O and error handling (#6083)
* feat: enhance profile picture copying with optimized I/O and error handling

* fix: correct docstring for copy_profile_pictures function
2025-02-03 15:56:47 +00:00
anovazzi1
d24e989a91
fix: abort connection on error preventing infinite build (#6050)
* fix: abort connection on build errors

* fix: streamline error message formatting in ErrorMessage class

* test: remove timeout from waitForSelector in generalBugs-shard-10.spec.ts

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-03 15:56:26 +00:00
codeflash-ai[bot]
d676aef9b4
refactor: Speed up function _serialize_dataframe by 123% in PR #6044 (refactor-serialization) (#6078)
* feat: Implement serialization functions for various data types and add a unified serialize method

* feat: Enhance serialization by adding support for primitive types, enums, and generic types

* fix: Update Pinecone integration to use VectorStore and handle import errors gracefully

* test: Add hypothesis-based tests for serialization functions across various data types

* refactor: Replace custom serialization logic with unified serialize function for consistency and maintainability

* refactor: Replace recursive serialization function with unified serialize method for improved clarity and maintainability

* refactor: Replace custom serialization logic with unified serialize function for improved consistency and clarity

* refactor: Enhance serialization logic by adding instance handling and streamlining type checks

* refactor: Remove custom dictionary serialization from ResultDataResponse for streamlined handling

* refactor: Enhance serialization in ResultDataResponse by adding max_items_length for improved handling of outputs, logs, messages, and artifacts

* refactor: Move MAX_ITEMS_LENGTH and MAX_TEXT_LENGTH constants to serialization module for better organization

* refactor: Simplify message serialization in Log model by utilizing unified serialize function

* refactor: Remove unnecessary pytest marker from TestSerializationHypothesis class

* optimize _serialize_bytes

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* feat: Add support for numpy integer type serialization

* feat: Enhance serialization with support for pandas and numpy types

* test: Add comprehensive serialization tests for numpy and pandas types

* fix: Update _serialize_dispatcher to return string representation for unsupported types

* fix: Update _serialize_dispatcher to return the object directly instead of its string representation

* optmize conditional

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* optimize length check

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* fix: Update string and list truncation to include ellipsis for clarity

* ️ Speed up function `_serialize_dataframe` by 123% in PR #6044 (`refactor-serialization`)
Certainly! Here's a more efficient version of the given program. The primary optimization performed here is removing the redundant `.apply()` call and directly truncating values in a more performant way.



### Changes Made.
1. **Removed redundant `apply` calls**: In the original code, there were nested `apply` calls which can be very slow on larger DataFrames. The new implementation converts the DataFrame to a list of dictionaries first and then truncates the values if needed.
2. **Optimized truncation logic**: Applied truncation directly while iterating over the dictionary after conversion from a DataFrame. This reduces overhead and improves readability.

These changes should enhance the runtime performance of the serialization process, especially for larger DataFrames.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2025-02-03 15:48:34 +00:00
Eric Hare
1acc724e23
fix: Better handle other non-prod environments (#6048)
* fix: Better handle other non-prod environments

* [autofix.ci] apply automated fixes

*  (duck_duck_go_search_run.py): refactor DuckDuckGoSearchComponent to improve code structure and readability
📝 (duck_duck_go_search_run.py): update DuckDuckGoSearchComponent with new display name, description, and documentation URL
📝 (duck_duck_go_search_run.py): update DuckDuckGoSearchComponent inputs with additional information and tool mode
📝 (duck_duck_go_search_run.py): update DuckDuckGoSearchComponent outputs with new output methods and display names
📝 (duck_duck_go_search_run.py): update DuckDuckGoSearchComponent methods to improve clarity and functionality

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-02-03 15:40:03 +00:00
codeflash-ai[bot]
4fd2b2feb1
refactor: Speed up function _serialize_series by 234% in PR #6044 (refactor-serialization) (#6079)
* feat: Implement serialization functions for various data types and add a unified serialize method

* optmize conditional

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* fix: Update string and list truncation to include ellipsis for clarity

* ️ Speed up function `_serialize_series` by 234% in PR #6044 (`refactor-serialization`)
Certainly! Here is a more optimized version of the program.



Changes made.
1. Replaced the `apply` method with dictionary comprehension. This avoids creating an intermediate Series, which can be an expensive operation.
2. Moved `_truncate_value` outside of the main function to keep the main function concise and focused.

* refactor: Remove unused `_truncate_value` function from serialization module

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2025-02-03 15:39:58 +00:00
Lucas Oliveira
5ef9d34599
fix: elevate edges on select (#6052)
Elevate edges on select

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-03 15:25:51 +00:00
dependabot[bot]
cee3d2a9ea
build(deps):(deps): bump astral-sh/setup-uv from 4 to 5 (#6060)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 5.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v4...v5)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-03 15:25:29 +00:00
dependabot[bot]
7d435a1d0e
build(deps):(deps): bump autofix-ci/action from ff86a557419858bb967097bfc916833f5647fa8c to 551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef (#6058)
build(deps):(deps): bump autofix-ci/action

Bumps [autofix-ci/action](https://github.com/autofix-ci/action) from ff86a557419858bb967097bfc916833f5647fa8c to 551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef.
- [Release notes](https://github.com/autofix-ci/action/releases)
- [Commits](ff86a55741...551dded8c6)

---
updated-dependencies:
- dependency-name: autofix-ci/action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-03 15:21:10 +00:00
dependabot[bot]
c3ffe225c4
build(deps):(deps): bump Namchee/conventional-pr from 0.15.5 to 0.15.6 (#6059)
Bumps [Namchee/conventional-pr](https://github.com/namchee/conventional-pr) from 0.15.5 to 0.15.6.
- [Release notes](https://github.com/namchee/conventional-pr/releases)
- [Commits](https://github.com/namchee/conventional-pr/compare/v0.15.5...v0.15.6)

---
updated-dependencies:
- dependency-name: Namchee/conventional-pr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-03 15:21:04 +00:00
Gabriel Luiz Freitas Almeida
c73070cd52
refactor: Implement unified serialization function (#6044)
* feat: Implement serialization functions for various data types and add a unified serialize method

* feat: Enhance serialization by adding support for primitive types, enums, and generic types

* fix: Update Pinecone integration to use VectorStore and handle import errors gracefully

* test: Add hypothesis-based tests for serialization functions across various data types

* refactor: Replace custom serialization logic with unified serialize function for consistency and maintainability

* refactor: Replace recursive serialization function with unified serialize method for improved clarity and maintainability

* refactor: Replace custom serialization logic with unified serialize function for improved consistency and clarity

* refactor: Enhance serialization logic by adding instance handling and streamlining type checks

* refactor: Remove custom dictionary serialization from ResultDataResponse for streamlined handling

* refactor: Enhance serialization in ResultDataResponse by adding max_items_length for improved handling of outputs, logs, messages, and artifacts

* refactor: Move MAX_ITEMS_LENGTH and MAX_TEXT_LENGTH constants to serialization module for better organization

* refactor: Simplify message serialization in Log model by utilizing unified serialize function

* refactor: Remove unnecessary pytest marker from TestSerializationHypothesis class

* optimize _serialize_bytes

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* feat: Add support for numpy integer type serialization

* feat: Enhance serialization with support for pandas and numpy types

* test: Add comprehensive serialization tests for numpy and pandas types

* fix: Update _serialize_dispatcher to return string representation for unsupported types

* fix: Update _serialize_dispatcher to return the object directly instead of its string representation

* optmize conditional

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* optimize length check

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* fix: Update string and list truncation to include ellipsis for clarity

* fix: Update _serialize_primitive to exclude string type from primitive handling

* feat: Enhance serialization to handle numpy types and introduce unserializable sentinel

* fix: Update test cases for serialization of numpy boolean values for consistency

---------

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2025-02-03 15:12:03 +00:00
Cristhian Zanforlin Lousa
5bcf4d001f
tests: update DuckDuckGo test selectors (#6080) 2025-02-03 09:52:49 -03:00
Cristhian Zanforlin Lousa
7b76c3fe77
fix: refactor DuckDuckGo search component to use new Component base class (nightly fix) (#6064)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-03 09:07:57 -03:00
Mendon Kissling
31c6b1240b
Docs: Components cleanup (#5987)
* docs: Expand vector stores documentation with new components

Add detailed documentation for:
- AstraDB Graph vector store
- Elasticsearch vector store

Update existing documentation links and improve component descriptions

* filesize-note

* docs: Update memory chatbot tutorial and add new components documentation

* docs: new-api-request-inputs

* docs: Update documentation to replace deprecated "Flow as Tool" with "Run flow" component

* docs: Add Tavily AI Search and Wikidata components documentation

* renamed-conditional-router

* move-url-component

* docs:url-fix

* Apply suggestions from code review

* docs: cloudflare links

* docs: improve link formatting

* docs: add output details

* docs: add SQL Query and Batch Run component

* fix-bottom-table

* avoid-future-tense

* code-review

* Apply suggestions from code review

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

* fix-linking-errors

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-01-31 20:25:58 +00:00
Mendon Kissling
f4d3451dd2
fix: size-down-docs-images (#6049)
fix:size-down-docs-images
2025-01-31 20:08:10 +00:00
Cristhian Zanforlin Lousa
c2411d4c22
refactor: Simplify _process_raw_result method in custom component processing (#6040)
* 🐛 (component.py): fix logic in _process_raw_result method to correctly extract data from result object based on conditions and return it

* [autofix.ci] apply automated fixes

* ♻️ (component.py): refactor extract_data method to improve readability and maintainability by using more descriptive variable names and simplifying the logic.

* [autofix.ci] apply automated fixes

* 🐛 (component.py): update isinstance check to use union type for better type handling

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-31 19:11:46 +00:00
Edwin Jose
0514d11d9c
feat: Add unit tests for run_flow_from_json with fake environment variables (#4015)
* Add tests for run_flow_from_json with fake environment variables

- Implemented test_run_flow_with_fake_env to validate flow execution with a fake .env file.
- Added test_run_flow_with_fake_env_TWEAKS to check flow execution using environment variables loaded from the fake .env file.

* Replace keys in tweaks with their corresponding environment variable values

- Implemented a function to recursively replace keys in the tweaks dictionary with values from the provided environment variables.

* updated to use better way to load test  json file

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* refactor: improve test readability and consistency in load tests

- Renamed variable `TWEAKS` to `tweaks_dict` for clarity and consistency across tests.
- Updated test function names to follow a consistent naming convention.
- Enhanced comments for better understanding of test intentions.
- Minor formatting adjustments to improve code readability.

* feat: add aload_flow_from_json and arun_flow_from_json to module exports

* fix: correct file path handling in aload_flow_from_json function

* fix: improve environment variable handling in aload_flow_from_json function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-31 18:51:34 +00:00
Eric Hare
e26b411f60
bugfix: Throw upstream error when invalid token in Astra DB Component (#6045)
* bugfix: Throw upstream error when invalid token

* [autofix.ci] apply automated fixes

* Update astradb.py

* [autofix.ci] apply automated fixes

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

* Small cleanup of dynamic config

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-31 17:49:46 +00:00
Edwin Jose
e15fddd3aa
fix: fixes langchain tool calling agent component toolkit (#5878)
* update tool kit in tool calling agent

* lint error

* Update agent.py

* [autofix.ci] apply automated fixes

* format errors

* [autofix.ci] apply automated fixes

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

* Update component_tool.py

* [autofix.ci] apply automated fixes

* Refactor tool calling logic for improved readability and efficiency

* Add tool_mode parameter to agent outputs

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-31 12:56:55 +00:00
Gabriel Luiz Freitas Almeida
58043362b5
fix: Add get_base_args method and refactor component initialization in Agent (#6026)
* feat: Add get_base_args method to Component class

Introduces a new method to retrieve base initialization arguments for components, including user ID, session ID, and tracing service. This method provides a convenient way to access essential context information during component initialization.

* refactor: Update AgentComponent to use get_base_args method

Modify AgentComponent to pass base initialization arguments when creating CurrentDateComponent and MemoryComponent, ensuring consistent context initialization across components.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-31 11:58:30 +00:00
Edwin Jose
2f9cd3e40b
fix: Text embedder caused by deprecated validation checks (#6024)
* fix embedder

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-31 11:24:57 +00:00
Gabriel Luiz Freitas Almeida
b00ab3ae5e
feat: Add tool_mode to Output model and add it to the skip output check (#6036)
* feat: Add tool_mode field to Output model for tool usage specification

* fix: Specify type for component_toolkit in to_toolkit method

* feat: Add method to determine if output should be skipped in ComponentToolkit

* [autofix.ci] apply automated fixes

* test: Add tool_mode field to Output model in test schema

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-30 21:39:20 +00:00
Marcelo Nunes Alves
22fa4cf088
fix: Problem checking Clickhouse connection when port is different from default (#5981)
* fix: Problem checking clickhouse connection when port is different from default

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-30 21:14:08 +00:00
Awais Athar
2043b2f4f7
fix: Correct widget code URL (#6033)
src attribute has extra double quotes
2025-01-30 21:09:50 +00:00
Cristhian Zanforlin Lousa
4ffe997249
refactor: convert hook files from .tsx to .ts for better type clarity (#6003)
change react custom hooks extensions to .ts file instead of .tsx
2025-01-30 20:44:41 +00:00
Eric Hare
311b5b35bf
fix: Correctly update reactive form on hosted instances (#6023)
* fix: Update reactive form on hosted dslf

* [autofix.ci] apply automated fixes

* Update astradb.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-30 15:39:28 +00:00
Eric Hare
c007a5fffc
fix: allow dynamic updating when hosted anywhere (#5999)
* fix: allow dynamic updating when hosted anywhere

* [autofix.ci] apply automated fixes

* Continue speed improvements

* [autofix.ci] apply automated fixes

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

* Fix autodetect with new collection

* [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>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-30 12:38:56 +00:00
Christophe Bornet
30c2fc159f
fix: Use relative paths for data files in unit tests (#6021)
Use relative paths for data files in unit tests

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-30 12:34:31 +00:00
Cristhian Zanforlin Lousa
e09d3fe0bf
revert: update components filter and build artifact logic (#6022) 2025-01-30 03:40:00 -08:00
Gabriel Luiz Freitas Almeida
492ce82968
chore: Mark internal vertex-related endpoints as deprecated (#5922)
feat: mark vertex-related endpoints as deprecated
2025-01-30 01:25:34 +00:00
Cristhian Zanforlin Lousa
7e756b9db5
refactor: improve artifact type handling and result processing (#6002)
🐛 (component.py): fix the logic to determine the artifact type based on raw data and status
🐛 (artifact.py): fix the default message assignment in post_process_raw function to ensure consistent behavior
2025-01-29 19:43:20 +00:00
Mendon Kissling
441bfed03b
docs: Update GCP deployment documentation to clarify pricing details (#6005)
* docs: Update GCP deployment documentation to clarify pricing details

* 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>
2025-01-29 19:34:14 +00:00
Mendon Kissling
7c5cce6143
Docs: follow on for database service config change (#5998)
* docs: remove redundant line in environment variables documentation

* docs: deprecate POOL_SIZE for centralized connection settings

* docs: Add LANGFLOW_LOAD_FLOWS_PATH environment variable
2025-01-29 18:50:18 +00:00
Cristhian Zanforlin Lousa
ccce11891d
fix: add correct size properties to novitaAI icon (#6001)
fix novita AI icon
2025-01-29 18:28:10 +00:00
Mendon Kissling
75a7520fe6
docs: MCP components (#5988)
* docs: add MCP Tools documentation for stdio and SSE connections

* docs: Update MCP server documentation links for clarity

* cleanup-links

* backtick

* an
2025-01-29 17:29:33 +00:00
Gabriel Luiz Freitas Almeida
c7584d8733
fix: Improve error handling at startup (#5994)
* fix: Handle network errors when fetching version notice

Catch and handle potential network connection errors when attempting to build the version notice, preventing potential startup failures due to version check issues

* refactor: Improve version check error handling and add docstring

Enhance version notice function by:
- Adding comprehensive docstring with description, args, returns, and example
- Using contextlib.suppress to handle network errors
- Removing redundant try-except block in print_banner
- Simplifying version check logic

* refactor: Improve telemetry error logging

Change telemetry service error logging from `logger.exception()` to `logger.error()` to reduce verbosity and prevent unnecessary stack trace printing

* refactor: Remove unnecessary logger import in version utility

Remove unused logger import and exception logging in version check function to simplify error handling and reduce unnecessary logging
2025-01-29 16:30:50 +00:00
Gabriel Luiz Freitas Almeida
e0f5cfccd8
feat: Centralize database connection settings and deprecate old parameters (#5960)
* feat: Add database connection settings configuration

Introduce a new `db_connection_settings` dictionary to centralize database connection parameters. Mark `pool_size` and `max_overflow` as deprecated, recommending the use of the new configuration dictionary instead.

* refactor: Improve database connection settings handling

Add a method to build connection kwargs that merges deprecated settings with the new db_connection_settings, providing a more flexible and backwards-compatible approach to database connection configuration.

* fix: Resolve SQLAlchemy async engine pool configuration for SQLite

Explicitly set AsyncAdaptedQueuePool for SQLite connections to address potential async engine configuration issues. This ensures proper pool handling when creating database connections, particularly for SQLite databases.

* test: Add mock testing for bundle loading from GitHub URLs

Enhance test coverage for `load_bundles_from_urls()` by introducing a mock fixture to simulate zip file content and mocking HTTP requests. This allows testing the bundle loading mechanism without making actual network calls.

* [autofix.ci] apply automated fixes

* test: Enhance GitHub URL detection test with mocking and improved coverage

Refactor `test_detect_github_url` to use AsyncMock and patch for more robust testing of GitHub URL detection, including verification of API calls and handling of different URL scenarios.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-29 11:44:31 +00:00
Gabriel Luiz Freitas Almeida
5fd91854b8
ci: Update pytest durations workflow schedule to run weekly on Monday (#5992)
ci: Update pytest durations workflow to run weekly on Monday
2025-01-29 11:40:50 +00:00
github-actions[bot]
5d07610c74
chore: update test durations (#5990)
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
2025-01-29 03:42:06 -08:00
Gabriel Luiz Freitas Almeida
3e2e2cecbb
refactor: Improve JWT error logging for better debugging of authentication issues (#5885)
fix: improve JWT error logging for better debugging of authentication issues
2025-01-29 03:04:35 +00:00
Jason
4658f086ae
feat: update novita logo and models (#5953)
* feat: update novita logo and models

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-29 02:55:25 +00:00