Commit graph

15,224 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
8c74ead3e8
feat: add SaveToFile component for DataFrame, Data and Message exports (#6114)
*  (save_to_file.py): Add a new component 'SaveToFileComponent' to save DataFrames, Data, or Messages to various file formats. This component allows users to select the input type, file format, and file path for saving the data.

* [autofix.ci] apply automated fixes

* 🔧 (save_to_file.py): refactor variable names for better readability and consistency
🐛 (save_to_file.py): handle unsupported input types and formats by raising ValueErrors with informative error messages

* [autofix.ci] apply automated fixes

*  (test_save_to_file_component.py): Add unit tests for the SaveToFileComponent to ensure proper saving of data to various file formats and handling of different input types.

* [autofix.ci] apply automated fixes

* 📝 (save_to_file.py): Add support for handling different types of message text in the SaveToFileComponent class to ensure proper saving to file
🔧 (test_save_to_file_component.py): Refactor test cases in the SaveToFileComponent test file for better readability and maintainability

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-17 12:35:57 +00:00
Dmitry
4e9231ce8b
docs: Added a link to the Russian README. (#6306)
* Update README.ES.md

* Update README.KR.md

* Update README.PT.md

* Update README.ja.md

* Update README.md

* Update README.zh_CN.md

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-17 12:32:44 +00:00
Dmitry
6c15bc9849
docs: Added a Proper Russian README Translation Create README.RU.md (#6303)
Added a Proper Russian README Translation Create README.RU.md

I’ve translated the README into Russian to make it more accessible. The translation stays true to the original while ensuring clarity and natural flow 🚀
2025-02-17 12:15:05 +00:00
Cristhian Zanforlin Lousa
ca8c5e1e57
test: Add validation for error handling in custom components and utility function (#6634)
 (validate-raise-errors-components.spec.ts): add test to validate error messages on popups when an error is raised in custom components
📝 (add-custom-component.ts): add utility function to add custom components in tests for easier testing and validation of error messages
2025-02-17 12:07:57 +00:00
Deon Sanchez
c902fb9e11
feat: Generic Callback Dialog Input for Custom Component (#6236)
* force dialog

* Reimplement backend dialog

* Update astradb.py

* Clean up dropdown options

* Remove unused import

* [autofix.ci] apply automated fixes

* Update astradb.py

* Ruff fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* fix: Conditionally render custom option dialog in dropdown

*  (NodeDialogComponent/index.tsx): Add support for passing 'name' prop to NodeDialog component to improve customization and flexibility
📝 (NodeDialogComponent/index.tsx): Update comments and remove unused import to improve code readability and maintainability
🔧 (dropdownComponent/index.tsx): Pass 'name' prop to Dropdown component to enhance customization and flexibility

*  Refactor NodeDialog component to improve state management and payload handling

* Update astradb.py

* [autofix.ci] apply automated fixes

*  Enhance NodeDialog and Dropdown components with improved payload handling and type safety

* Add DB creation functionality

* First version of create

* Update astradb.py

* Fix ruff errors

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* Update astradb.py

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update astradb.py

* [autofix.ci] apply automated fixes

* feat: Enhance dropdown and node dialog with loading states and improved UX

* refactor: Improve error handling in NodeDialog component

* refactor: Update default excluded keys in dropdown metadata filter

* [autofix.ci] apply automated fixes

* refactor: Update Vector Store RAG starter project JSON with formatting and connection ID corrections

* Hide fields that aren't relevant yet

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update astradb.py

* feat: Improve dropdown component with loading states and enhanced UX

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update astradb.py

* Simon feedback

* [autofix.ci] apply automated fixes

* feat: Enhance dropdown and UI components with status indicators and loading states

* refactor: Update dropdown metadata filtering to exclude 'icon' key

* fix: Conditionally render dropdown icon when available

* fix: Improve dropdown icon rendering with null checks

* chore: Remove debug console log in dropdown component

* Add support for icons in the dropdowns

* Update astradb.py

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* feat: Enhance dropdown status display and color handling

* feat: Add auto-close functionality to node dialog and expand status color handling

* feat: Add real-time template refresh for node dialog fields

* refactor: Improve node dialog component state management and naming

* Async for create collection

* [autofix.ci] apply automated fixes

* Dynamic provider list generation

* Update astradb.py

* [autofix.ci] apply automated fixes

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

* Update astradb.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-02-15 02:10:12 +00:00
Gabriel Luiz Freitas Almeida
b8d2e63221
fix: Update default URL in URL component test (#6637)
test: Update default URL in URL component test
2025-02-14 21:50:38 +00:00
Gabriel Luiz Freitas Almeida
c62ac0b702
chore: Update codeflash config to ignore components (#6340)
chore: update codeflash config to ignore components
2025-02-14 21:38:16 +00:00
Edwin Jose
a1967bc472
feat: adds metadata and batch_index to batch_run (#6318)
* Update batch_run.py

* updates to test component and fixes formatting

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-14 21:04:50 +00:00
Lucas Oliveira
ec5259a0fc
fix: updates color of inactive buttons on table component (#6315)
Updated color of disabled buttons on table component
2025-02-14 20:33:14 +00:00
Cristhian Zanforlin Lousa
d4c04c89fe
tests: Improve Error Handling and Update Element Test IDs in filterEdge-shard-1.spec.ts (#6632)
 (filterEdge-shard-1.spec.ts): Update test to log an error message if an element is not visible during the test execution.
2025-02-14 20:07:28 +00:00
Lucas Oliveira
45e2f739d5
fix: adds edge filtering only to parameters not hidden (#6270)
Adds advanced filter to only filter by showing fields on click of edge
2025-02-14 16:59:56 +00:00
Cristhian Zanforlin Lousa
0a631a68c2
fix: Update path filters, test tags and backend processing (#6613)
*  (tests): update tag value from "@starter-project" to "@starter-projects" for consistency across test files.

* 📝 (changes-filter.yaml): add new path "src/backend/base/langflow/custom/**" to starter-projects section
♻️ (changes-filter.yaml): remove path "src/backend/base/langflow/components/**" from components section and add it to starter-projects section
♻️ (changes-filter.yaml): add new path "src/backend/base/langflow/custom/**" to components section

* 🐛 (component.py): fix a bug where the status was not being returned when there is only one output in the component

* 🔧 (ci.yml): Expand path filter outputs for more comprehensive CI testing

* fix docstring placement

*  (group.spec.ts): update click event modifiers to use "ControlOrMeta" for better cross-platform compatibility

*  (changes-filter.yaml): add new directory "src/backend/base/langflow/graph/" to starter-projects for processing in the build pipeline.

* 🔄 Refactor graph data structures from sets to lists for performance and compatibility

* 🔧 Optimize RunnableVerticesManager predecessor checks and type hints

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-14 11:20:08 -03:00
Mike Fortman
0fbe1b0d09
feat: Add new tracking events for flow and data load executions (#6492)
* add new events

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-13 23:14:51 +00:00
Edwin Jose
79f91e3ac1
feat: add template for loop component: ArXiv search result Translator (#6260)
* Create LoopTemplate.json

* Update LoopTemplate.json

* refactor: Remove unused tag "all-templates" from LoopTemplate.json

* refactor: Update LoopTemplate.json description and adjust dimensions for improved clarity

* add-title

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-02-13 21:16:53 +00:00
Edwin Jose
b38b6aa601
fix: inconsistent text table result for Message Type output, setting message.text as default status instead of Table as self.status (#6319)
* update message output to display only the text

* Update component.py

* Update component.py

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/custom/custom_component/component.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

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-13 20:49:47 +00:00
Mendon Kissling
a4a70d4aea
docs: ui improvements (#6317)
* use-yarn-not-npm

* swap-api-menu-items

* fix-errors

* force-sidebar-open

* increase-custom-css-values
2025-02-13 19:59:12 +00:00
codeflash-ai[bot]
1b6675ef68
️ Speed up method Graph.find_runnable_predecessors_for_successor by 129% in PR #6309 (fix-order-loop) (#6310)
* feat: add is_loop property to Vertex class for detecting looping outputs

* feat: improve vertex runnability logic for graph traversal

- Update `is_vertex_runnable` to handle loop vertices more robustly
- Modify `are_all_predecessors_fulfilled` to better manage cycle dependencies
- Change adjacency maps to use sets for more efficient predecessor/successor tracking

* ️ Speed up method `Graph.find_runnable_predecessors_for_successor` by 129% in PR #6309 (`fix-order-loop`)
Here's the optimized version of the program.

### Changes and Optimizations.

* fix(serialization.py): update isinstance check for list and tuple to use union operator for better type checking

---------

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-13 12:38:01 +00:00
Gabriel Luiz Freitas Almeida
70e8650813
feat: Update dependencies to add smolagents package (#6030)
* chore: Update Pillow and Pandas dependencies to latest patch versions

* chore: Update NVIDIA AI Endpoints and Pillow dependencies

* feat: Add smolagents dependency to project requirements

* feat: Add HuggingFace model bridge for LangChain integration

Implement a model bridge that allows seamless conversion between LangChain and HuggingFace model interfaces, supporting message and tool call translations

* docs: Update usage example in LangChainHFModel to improve clarity

* fix: update smolagents dependency version to 1.8.0

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-02-13 12:37:13 +00:00
Gabriel Luiz Freitas Almeida
f5a2c1cb3e
fix: Enhance vertex runnability logic with loop detection (#6309)
* feat: add is_loop property to Vertex class for detecting looping outputs

* feat: improve vertex runnability logic for graph traversal

- Update `is_vertex_runnable` to handle loop vertices more robustly
- Modify `are_all_predecessors_fulfilled` to better manage cycle dependencies
- Change adjacency maps to use sets for more efficient predecessor/successor tracking

* refactor: change graph adjacency maps from lists to sets for improved performance

- Update graph data structures to use sets instead of lists for predecessor, successor, and parent-child maps
- Modify type hints and method signatures to reflect the change from list to set
- Improve graph traversal and vertex tracking efficiency by using set operations
2025-02-13 12:02:36 +00:00
codeflash-ai[bot]
f3ddbcf1a8
refactor: ️ Speed up function _truncate_value by 45% (main) (#6334)
️ Speed up function `_truncate_value` by 45% in PR #6323 (`test-smol`)
To optimize the Python program for faster performance, we should make a few adjustments. Specifically, the use of multiple `isinstance` checks and logical conditioning can be streamlined to reduce the runtime overhead. Here's the optimized version of the program.



### Explanation.

1. **Order and Conditions**: We adjusted the order to check the limit first. This way, we only perform the `isinstance` check if the limit is set, thereby potentially reducing the number of checks needed.
2. **Combined Types**: Instead of using `isinstance(value, list | tuple)`, which uses the `|` operator for a union type, we use the more traditional tuple form `isinstance(value, (list, tuple))`. This makes it explicit that we’re checking against multiple types and can be a bit faster.
  
These changes should result in slight performance improvements by reducing the number of checks and short-circuiting earlier.

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-13 11:49:15 +00:00
Gabriel Luiz Freitas Almeida
63294b9b08
refactor: move API key input into Cohere and NVIDIA rerank components (#6339)
Remove generic API key input from base compressor model and add specific API key inputs for Cohere and NVIDIA Rerank components
2025-02-13 11:28:18 +00:00
anovazzi1
339f06571b
fix: remove unnecessary lockChat condition in ChatMessage loading state (#6316) 2025-02-12 21:58:59 +00:00
Lucas Oliveira
a8daf06d16
fix: changed naming for download button on sidebar nav context menu (#6238)
Changed from Download Content to Download for the sidebar folder buttons

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-02-12 20:31:33 +00:00
Lucas Oliveira
a64f3764be
fix: made tool_mode components minimizable (#6237)
Fixed count handles function to allow tool_mode to minimize

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-02-12 20:31:24 +00:00
Cristhian Zanforlin Lousa
fda2f17a9f
fix: Improve path handling and type annotations in FaissVectorStoreComponent (#6081)
* 📝 (faiss.py): import Path and List modules for better type hinting and file path handling
🐛 (faiss.py): fix issue with building vector store when persist_directory is not provided
🐛 (faiss.py): fix issue with loading FAISS index when index file does not exist
📝 (faiss.py): add type hints for search_documents method parameters and return value
📝 (faiss.py): remove unnecessary logging statements from search_documents method

* [autofix.ci] apply automated fixes

* 📝 (faiss.py): add 'required' flag to the 'Persist Directory' input field to ensure it is mandatory for the user to provide a value

* 🔧 (faiss.py): refactor build_vector_store method to handle persist_directory more efficiently
🔧 (faiss.py): refactor search_documents method to handle persist_directory more efficiently

* [autofix.ci] apply automated fixes

* 🔧 (faiss.py): refactor get_persist_directory method to return resolved persist directory path or current directory if not set
♻️ (faiss.py): refactor build_vector_store and search_documents methods to use get_persist_directory method for path resolution

* ♻️ (faiss.py): refactor resolve_path method to be static and return a string instead of Path object for consistency and clarity

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-12 18:32:08 +00:00
Cristhian Zanforlin Lousa
d98d37778d
feat: enhance YouTubeTranscripts component with Data output support (#6113)
* 📝 (youtube_transcripts.py): update description of YouTubeTranscriptsComponent to be more concise and accurate
 (youtube_transcripts.py): add new output option 'data_output' to provide transcript along with the source video URL
🔧 (youtube_transcripts.py): add method 'get_data_output' to handle the new 'data_output' output option and return a Data object with transcript, video URL, and error message

* [autofix.ci] apply automated fixes

* 📝 (youtube_transcripts.py): improve documentation for get_data_output method to provide a clear description of the returned data object and its contents
🐛 (youtube_transcripts.py): handle specific exceptions from the youtube_transcript_api library to provide more informative error messages and improve error handling in the get_data_output method

* [autofix.ci] apply automated fixes

* 🐛 (youtube_transcripts.py): handle case where no transcripts are found by updating the error message and returning a default data object
🔧 (youtube_transcripts.py): refactor get_data_output method to use a default data object and combine all transcript parts into a single continuous text

* [autofix.ci] apply automated fixes

*  (test_youtube_transcript_component.py): Add unit tests for YouTubeTranscriptsComponent to test various functionalities such as component initialization, output generation, error handling, and setting translation languages.

* [autofix.ci] apply automated fixes

*  (test_youtube_transcript_component.py): update file_names_mapping fixture to return a non-empty list to properly test different versions of file names mapping in the YouTube transcripts component

* [autofix.ci] apply automated fixes

* 📝 (test_youtube_transcript_component.py): Add docstrings and improve variable names for better readability and maintainability
🔧 (test_youtube_transcript_component.py): Refactor error handling in test methods to use descriptive error messages and improve code readability

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-12 18:25:22 +00:00
Edwin Jose
17f1ecf997
feat: Structured Output component Template: Portfolio Website Code Generator (#6233)
* JSON for portfolio code generator

* fix: remove redundant tag from Portfolio Website Code Generator

* Update Portfolio Website Code Generator.json

* fix: update descriptions and adjust layout in Portfolio Website Code Generator

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-02-12 18:05:24 +00:00
Marco Vinciguerra
898775c36d
feat: ScrapeGraph AI component updates and add new component ScrapgraphSearch API (#6305)
* feat: add search

* Update __init__.py

* Update pyproject.toml

* feat: update scraegraph components

* Update scrapegraph_smart_scraper_api.py

* Update scrapegraph_smart_scraper_api.py

* removed required

* Update scrapegraph_smart_scraper_api.py

* formatting
2025-02-12 17:55:26 +00:00
Carlos Coelho
ec445ce7df
feat: set advanced to false on If-Else component message field (#6278)
'feat: remove attribute advanced true from if-else component

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-12 16:59:00 +00:00
Edwin Jose
553e3a0b12
fix: improved the huggingface emdeddings component, to handle local inference and serverless inference (#6292)
Update huggingface_inference_api.py
2025-02-12 16:14:42 +00:00
Cristhian Zanforlin Lousa
f4715407b8
fix: add config options and error handling to MistralAI component (#6131)
*  (mistral.py): Add new input parameters to MistralAIModelComponent for better customization and control over the Mistral model configuration
♻️ (mistral.py): Refactor build_model method to improve readability and maintainability by using try-except block for error handling and updating parameter names for better clarity

* [autofix.ci] apply automated fixes

* ♻️ (mistral.py): refactor MistralAIModelComponent class to improve code readability by formatting the IntInput and BoolInput sections for better organization and clarity.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-12 14:10:23 +00:00
Mendon Kissling
f7db8eecf2
docs: more information on run flow component (#6046)
* edit-tools

* more-info-on-edit-tools

* component-as-tool-metadata

* Apply suggestions from code review

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

* Fix formatting and clarity in agent tool documentation

* clarity-on-tool-and-run-flow

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-02-12 14:09:29 +00:00
Cristhian Zanforlin Lousa
39c4304543
feat: update OpenAI component temperature limit to 1.0 (#6194)
update openai component temperature max=1
2025-02-12 13:56:29 +00:00
Cristhian Zanforlin Lousa
7e132b37f4
fix: add optional chaining and improve code robustness (#6262)
🔧 (switchOutputView/index.tsx): Fix issue with accessing nested properties in flowPoolNode data object
🔧 (switchOutputView/index.tsx): Fix issue with accessing nested properties in resultMessage object
2025-02-12 13:56:26 +00:00
Christophe Bornet
ffbc97bfc9
feat: Use Alembic with async driver (#6258)
Use Alembic with async driver
2025-02-11 23:11:55 +00:00
Edwin Jose
93bc185ca9
fix: run flow component tool mode issues, causing tool result to be empty (#6121)
* update

* [autofix.ci] apply automated fixes

* updates

* [autofix.ci] apply automated fixes

* Update run_flow.py

* review suggestions

* Update src/backend/base/langflow/components/logic/run_flow.py

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-02-11 17:41:17 +00:00
Cristhian Zanforlin Lousa
3ea8e7291e
feat: enhance ChatMessage loading state management (#6196)
🔧 (chat-message.tsx): add isBuilding variable to track if the chat message is being built to improve user experience

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-11 17:06:20 +00:00
Mendon Kissling
babc3e2700
docs: processing components (#6099)
* docs: renamed-components-and-syntax

* link-anchors

* Apply suggestions from code review

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

* code-review

* docs: add legacy notice to components-processing documentation

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-02-11 17:01:36 +00:00
Edwin Jose
d1402b888f
feat: option to hide a column in frontend when defining a Table Input, hides Tool identifier from table display (#6222)
* added changes to hide fields from table input

* [autofix.ci] apply automated fixes

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-11 16:40:12 +00:00
Cristhian Zanforlin Lousa
e1e9d7baef
refactor: migrate chat lock state to useFlowStore (#6166)
* 🔧 (frontend): remove unused lockChat and setLockChat props from ChatViewWrapper and ChatView components
♻️ (frontend): refactor ChatMessage component to use useFlowStore for lockChat state management instead of passing it as a prop

* 🔧 (chat-message.tsx): Remove unused variables setLockChat and lockChat
♻️ (chat-message.tsx): Refactor code to use isBuilding state instead of setLockChat and lockChat variables
♻️ (new-modal.tsx): Refactor code to remove setLockChat function and references
♻️ (flowStore.ts): Refactor code to remove setLockChat function and lockChat variable
♻️ (components/index.ts): Refactor code to remove setLockChat function and lockChat variable
♻️ (flow/index.ts): Refactor code to remove setLockChat function and lockChat variable
♻️ (buildUtils.ts): Refactor code to remove setLockChat function and references

* ♻️ (chat-view.tsx): refactor variable name 'lockChat' to 'isBuilding' for better clarity and semantics in the code.

* 🔧 (chat-view.tsx, chat-input.tsx, button-send-wrapper.tsx, text-area-wrapper.tsx, upload-file-button.tsx, use-focus-unlock.ts, use-upload.ts, chat-message.tsx, index.ts): Remove lockChat variable and replace it with isBuilding variable to improve code readability and consistency.

* ♻️ (button-send-wrapper.tsx): remove unnecessary disabled prop from Button component to improve code readability and maintainability
2025-02-11 16:39:56 +00:00
Gabriel Luiz Freitas Almeida
8a5cfa3526
fix: make extension check case-insensitive in BaseFileComponent (#6256)
fix: Case-insensitive file extension validation in BaseFileComponent

Modify file extension validation to use lowercase comparison, ensuring consistent handling of file extensions across different input cases
2025-02-11 15:14:26 +00:00
Saurabh Misra
10aea2e9b6
refactor: (codelash) ️ Speed up function find_all_cycle_edges by 17% (#5389)
️ Speed up function `find_all_cycle_edges` by 17%
Here is the optimized version of the given program. The major optimization here is to avoid unnecessary list concatenations in the DFS recursion by using a more efficient approach for aggregating cycle edges.

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2025-02-11 11:45:02 +00:00
Saurabh Misra
1bf6c847b7
refactor: (codeflash) ️ Speed up function update_target_handle by 27% in src/backend/base/langflow/graph/graph/utils.py (#5388)
* ️ Speed up function `update_target_handle` by 27%
Sure, here are the optimized versions of the given functions. The key optimizations include avoiding redundant dictionary lookups, removing unnecessary condition checks, and simplifying the logic where possible.

* lint fix

* Apply suggestions from code review

Co-authored-by: Christophe Bornet <cbornet@hotmail.com>

---------

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
2025-02-11 11:02:48 +00:00
Gabriel Luiz Freitas Almeida
b73b3a09d8
chore: Bump version to 1.1.5 for langflow and 0.1.5 for langflow-base (#6241) 2025-02-10 15:27:10 -03:00
Gabriel Luiz Freitas Almeida
f9b2ce18a4
fix: Improve variable decryption error handling (#6199)
* fix: Improve variable decryption error handling in DatabaseVariableService

Add robust error handling for variable decryption, logging decryption failures and falling back to the original value for generic type variables

* chore: Bump version to 1.1.4.post1 for langflow and 0.1.4.post1 for langflow-base
2025-02-07 18:34:13 +00:00
Deon Sanchez
141e6736d6
chore: Add CustomLoader component and integrate with loading states in Admin, Flow, and Main pages (#6047)
* feat: Add CustomLoader component and integrate with loading states in Admin, Flow, and Main pages

* refactor: simplify CustomLoader component and remove conditional loading logic

* feat: add configurable size to CustomLoader component
2025-02-07 16:22:24 +00:00
Edwin Jose
f9e41f93a0
feat: improve error handling of Agent component, solves Empty ExceptionWithMessageError (#6097)
* Gracefully handle Errors

* updates to Error handling

* update in Error handling

* update lint error similar to main

* [autofix.ci] apply automated fixes

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

* feat: add max retry and request timeout to open ai component, fixes remote protocol error caused by OpenAI LLM in Agents (#6118)

* update to __str__ and fix lint errors

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-07 12:55:58 +00:00
Cristhian Zanforlin Lousa
92640834fa
feat: rename MergeData to CombineData component (#6167)
*  (processing): Rename MergeDataComponent to CombineDataComponent for better clarity and consistency in naming conventions. Add CombineDataComponent to handle different data combination operations like concatenation, appending, merging, and joining.

* [autofix.ci] apply automated fixes

* ♻️ (combine_data.py): refactor class name from CombineDataComponent to MergeDataComponent for better clarity and consistency with the operation performed

*  (processing): Rename CombineDataComponent to MergeDataComponent for better clarity and consistency
📝 (processing): Add new MergeDataComponent to combine data using different operations like Concatenate, Append, Merge, and Join

* ♻️ (processing/__init__.py): refactor CombineDataComponent to MergeDataComponent for better naming consistency and clarity

*  (processing/__init__.py): rename merge_data module to combine_text for better clarity and consistency

---------

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-07 12:07:19 +00:00
Cristhian Zanforlin Lousa
8208310fa6
refactor: replace StrInput with MultilineInput for URL fields (FirecrawlAPI) (#6160)
* 📝 (firecrawl_crawl_api.py): update StrInput to MultilineInput for better handling of URL input
📝 (firecrawl_scrape_api.py): update StrInput to MultilineInput for better handling of URL input

* [autofix.ci] apply automated fixes

*  (firecrawl_crawl_api.py): introduce StrInput class to langflow.io module for handling string inputs in the API

* [autofix.ci] apply automated fixes

*  (changes-filter.yaml): add new directories to components list for langflow schema and utils to be included in changes filtering

*  (changes-filter.yaml): add new directory "src/backend/base/langflow/graph/" to components list for changes filtering in the workspace.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-07 11:56:26 +00:00
Jorge Piedrahita Ortiz
414797f3f8
feat: add sambanova-langchain package (#5923)
* add new sambanova available models

* feat: add sambanova-langchain package

add sambanova package
minor improvements in sambanova component
add sambanova in agent examples

* [autofix.ci] apply automated fixes

* fmt

* [autofix.ci] apply automated fixes

* minor changes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-02-07 11:55:24 +00:00