Commit graph

16,102 commits

Author SHA1 Message Date
Lucas Oliveira
24e7acf972
fix: remove placeholder duplicate on inputs (#8521)
Made placeholder transparent
2025-06-18 21:33:21 +00:00
Mike Fortman
50d58609a4
refactor: Remove Flow description from project view (#8620)
remove description
2025-06-18 17:03:57 +00:00
Gabriel Luiz Freitas Almeida
bd0af911d9
refactor: replace hardcoded serialization constants with getter functions (#8616)
* refactor: move serialization length limits to settings and use cached getters

* refactor: replace hardcoded serialization limits with dynamic settings-based values

* refactor: replace hardcoded serialization constants with getter functions

* 📝 Add docstrings to `move-max-consts-to-settings` (#8617)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix:  improve docstring formatting

* fix: ensure flow_id is UUID type when creating vertex build record

* docs: enhance docstrings for max_text_length and max_items_length in Settings class

Updated the docstrings for max_text_length and max_items_length to clarify their purpose and behavior regarding UI display and truncation.

* docs: add LANGFLOW_MAX_ITEMS_LENGTH and LANGFLOW_MAX_TEXT_LENGTH environment variables

Introduced new environment variables to configure the maximum number of items and text length displayed in the UI. Updated documentation to reflect these changes and their impact on UI truncation behavior.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-18 16:34:25 +00:00
Deon Sanchez
ea02f639ff
fix: code snippet allows horizontal scroll (#8564)
* fix: add overflow-hidden class to BaseModal.Content in CodeAreaModal for improved layout

* fix: update BaseModal.Content in CodeAreaModal to use overflowHidden prop for better layout control
2025-06-18 15:26:50 +00:00
Mike Fortman
ddc17d4c77
fix: Match front and backend prompt variable behavior (#8522)
* fix handling of braces in front and back end

* add tests

* ruff check fix

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

* address pr comments and switches to use formatter

* remove code fence that isn't working

* comment

* [autofix.ci] apply automated fixes

* text fix

* style fix

* test fix

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-18 14:24:39 +00:00
Carter Rabasa
2d34bc3b37
docs: added CVE alert (#8600)
added CVE alert
2025-06-18 12:47:21 +00:00
Gabriel Luiz Freitas Almeida
6ada07a61f
refactor: remove conditional voice mode support from backend and frontend (#8597)
* revert changes that made voice mode conditional to the presence of webrtcvad

* refactor: lazy-load webrtcvad dependency

* refactor: remove try-except block and directly import voice_mode_router

* [autofix.ci] apply automated fixes

* feat: add LRU caching to voice activity detector initialization

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-18 12:23:31 +00:00
Edwin Jose
6dd5ebe33e
fix: Set status properly for Type Convert (#8599)
* Update converter.py

* [autofix.ci] apply automated fixes

*  (freeze.spec.ts): update URL in test case to use a more specific and relevant link for testing purposes

---------

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: cristhianzl <cristhian.lousa@gmail.com>
2025-06-17 20:16:33 +00:00
Jordan Frazier
35cda90121
feat: use getaddrinfo to handle ipv4 and ipv6 loopback addresses on startup #8548 (#8594)
* Use getaddrinfo to handle ipv4 and ipv6 loopback addresses on startup

* [autofix.ci] apply automated fixes

* slightly better exception handling

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-17 20:11:00 +00:00
Mike Fortman
35fa3fd85c
fix: Have markdown playground content take up the full width (#8525)
* markdown width fix

* template clean

*  (freeze.spec.ts): add a new utility function runChatOutput to handle running chat output in tests for better code organization and reusability.

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2025-06-17 19:06:45 +00:00
Jordan Frazier
2ff3345182
docs: create initial security policy (#8598)
* Create security.md

* move known to end
2025-06-17 18:55:43 +00:00
Mendon Kissling
1fcb500930
docs: add examples for users endpoints (#8273)
* initial-content

* sentence-case

* user-id-clarification

* apostrophe and clarity

* Apply suggestions from code review

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

* add-auth-to-requests-that-use-it

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-06-17 17:23:18 +00:00
Eric Hare
cb6ec940f1
fix: Properly parse CURL commands for api request (#8592)
* fix: Properly parse CURL commands for api request

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-17 17:07:56 +00:00
Gabriel Luiz Freitas Almeida
4d3eae63ac
feat: conditionally render voice button based on voice mode state (#8561)
* chore: update webrtcvad dependency and add optional audio support

- Updated webrtcvad version requirement to >=1.9.4 in pyproject.toml and uv.lock.
- Moved webrtcvad to optional dependencies under the new 'audio' category in both pyproject.toml files for better modularity.
- Ensured compatibility with existing dependencies while enhancing documentation for optional audio features.

* fix: handle optional import of voice_mode_router in API initialization

- Updated the API router initialization to conditionally include the voice_mode_router if it is available, improving modularity and preventing import errors.
- Adjusted the import statement for voice_mode_router to handle ImportError gracefully, ensuring the application remains robust in its absence.

* feat: add voice mode flag to API configuration

- Introduced a new function `get_voice_mode_enabled` to check for the availability of the `webrtcvad` library, enhancing the API's capability to support voice mode features.
- Updated the `ConfigResponse` schema to include `voice_mode_enabled` flag, allowing clients to query the status of voice mode support.
- Integrated the voice mode feature flag into the `get_config` endpoint response, improving the configurability of the API.

* test: skip voice mode tests if webrtcvad is not installed

- Added a conditional import for the webrtcvad library in the voice mode test suite.
- Implemented a pytest marker to skip tests when webrtcvad is unavailable, enhancing test robustness and preventing unnecessary failures.

* feat: add voice mode state management to flows manager store

- Introduced `voiceModeEnabled` state and `setVoiceModeEnabled` action in the flows manager store to manage the voice mode feature.
- Updated the `ConfigResponse` interface and `useGetConfig` hook to integrate the new voice mode state, allowing for dynamic configuration updates.
- Enhanced the API's configurability by ensuring the voice mode state is properly set based on the API response.

* feat: conditionally render voice button based on voice mode state

- Integrated `voiceModeEnabled` from the flows manager store to control the visibility of the VoiceButton component.
- The VoiceButton will now return null if voice mode is not enabled, enhancing the user interface by preventing unnecessary rendering.

* fix: ensure boolean conversion for voice mode state in config hook

- Updated the `setVoiceModeEnabled` function in the `useGetConfig` hook to explicitly convert the `voice_mode_enabled` value to a boolean, ensuring consistent handling of the voice mode state based on API responses.

* refactor: conditionally import voice_mode_router in API initialization

- Updated the API router to conditionally include the voice_mode_router based on its availability, enhancing modularity and preventing import errors.
- Adjusted the __init__.py file to dynamically add voice_mode_router to the __all__ list if the import is successful, improving the API's robustness.

* chore: revert mcp version update

* refactor: reorder router initialization and add audio flag to backend install task

* feat: add audio module to backend installation command in VS Code tasks

* ci: add audio extras to uv sync in frontend tests
2025-06-17 15:23:12 +00:00
Reid Beels
1950116916
fix: prevent SQLite error in advanced run flow API (#8576)
* fix: prevent SQLite error in advanced run flow API

Passing the flow ID as a string causes a SQLAlchemy error when running
on databases without a dedicated UUID data type. Passing a UUID object
works consistently across both SQLite and PostgreSQL.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-17 11:39:56 +00:00
Jordan Frazier
b77351331d
fix: replace instances of 127.0.0.1 to localhost (#8536)
* Replace instances of 127.0.0.1 to localhost

* fix some replace-all issues

* fix some replace-all issues

* update starterprojects

* Upgrade uvlock
2025-06-16 15:54:04 +00:00
Cristhian Zanforlin Lousa
5c38d0223d
fix(ui): improve SettingsVoiceModal functionality and alignment (#8433)
* 🐛 (audio-settings-dialog.tsx): fix alignment offset in DropdownMenuContent component
📝 (audio-settings-dialog.tsx): remove unnecessary check for empty value in handleOpenAIKeyChange function

*  (freeze.spec.ts): add support for adding a flow to test on an empty langflow if the first run langflow is greater than 0

*  (freeze.spec.ts): update timeout values for page.waitForSelector to improve test reliability and prevent false negatives

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-16 15:30:02 +00:00
github-actions[bot]
706cb1eec5
chore: update test durations (#8550)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2025-06-16 11:05:18 -03:00
Cristhian Zanforlin Lousa
d1a22b947a
feat: refactor component tool description format to prioritize component description (#8327)
* 📝 (component_tool.py): change the order of component description and method in the build_description function to improve readability and consistency

* ♻️ (component_tool.py): refactor build_description function to only return the component description without including the output method

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-06-16 13:14:41 +00:00
Lucas Oliveira
20f3a32ccc
fix: updated mcp server link to docs (#8539)
updated mcp server tab link
2025-06-14 18:37:29 +00:00
Edwin Jose
e7f78d99cb
refactor: update build_structured_output to return only last output element (#8467)
* Update structured_output.py

* template updates

* Update Financial Report Parser.json

* Update structured_output.py

* Update structured_output.py

* update strcutred output with optimisations

* Update test_structured_output_component.py

* fix lint

* update templates

* [autofix.ci] apply automated fixes

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

* Update structured_output.py

* [autofix.ci] apply automated fixes

* Update test_structured_output_component.py

* [autofix.ci] apply automated fixes

* fix image sentiment analysis

* [autofix.ci] apply automated fixes

* Update Image Sentiment Analysis.json

* [autofix.ci] apply automated fixes

* update template with new language model component

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-13 23:02:48 +00:00
Deon Sanchez
c18330d449
fix: update selected_output field to handle which outputs is displayed first (#8538)
* fix: update selected_output field in various starter project JSON files

- Added or adjusted the "selected_output" field in multiple starter project JSON files to ensure consistency and correct functionality.
- Refactored the output selection logic in the GenericNode component to utilize the updated "selected_output" property.

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

* fix: enhance output handling in GenericNode and NodeOutputField components

- Added a check to prevent auto-unhiding outputs with group_outputs set to false in NodeOutputField.
- Updated the GenericNode component to ensure the selected_output field is correctly assigned during node updates.
- Introduced group_outputs property in the OutputFieldType to support new output handling logic.

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

* Revert starter_projects directory to main branch state

* 📝 (general-bugs-shard-3909.spec.ts): update test description to match the changed button text for better clarity and maintainability

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-06-13 19:57:18 +00:00
Mike Fortman
a62902ca92
fix: Cleanup favicon and old logo assets to fix flash of old favicon (#8462)
favicon flash fix
2025-06-13 19:12:11 +00:00
Edwin Jose
d5eef7a669
fix(agent): allow agents to run without requiring any tools (#8533)
fix

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-13 17:34:17 +00:00
Ilia Krupin
1236643711
fix: 500 error when downloading projects with non-ASCII characters (ex. Cyrillic) names (#8483)
* fix: encode Cyrillic filenames in Content-Disposition header

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Ilia Krupin <ilia.krupin@tedo.ru>
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-06-13 16:26:08 +00:00
Mike Fortman
15f0c7040b
refactor: Update access link for langflow run (#8492)
* Update host selection

* cleanup

* [autofix.ci] apply automated fixes

* ruff check fix2

* Merge branch 'main' of github.com:langflow-ai/langflow into lfoss-1357

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-13 16:19:34 +00:00
Deon Sanchez
f091d6373c
fix: add selected_output field to components & templates to prevent disconnected edges (#8444)
* feat: add selected_output property to Component and update validation logic

* feat: add selected_output property to various components and update related logic

* fix: improve error handling in JSON processing and update type hints

* refactor: clean up Makefile and reorder JSON properties in Vector Store RAG.json

* Removed the update_selected_outputs target from the Makefile to streamline the build process.
* Reordered properties in Vector Store RAG.json for consistency, ensuring "selected_output" appears before "type" in multiple entries.

* chore: remove add_selected_outputs.py script

* Deleted the add_selected_outputs.py script, which was responsible for adding selected_output fields to Langflow JSON template files. This script is no longer needed as part of the project.

* chore: clean up Makefile by removing unnecessary blank line

* Removed an extra blank line in the Makefile to improve readability and maintain consistency.

* chore: tidy up Makefile by adding a blank line for better readability

* Added a blank line before the help target in the Makefile to enhance readability and maintain consistency in formatting.

* chore: remove unnecessary blank line in Makefile

* Eliminated an extra blank line before the help target in the Makefile to enhance readability and maintain consistency in formatting.

* [autofix.ci] apply automated fixes

* fix(GenericNode): update output selection logic to use selected_output name

* Modified the logic for selecting the initial output in GenericNode to match the selected_output name from the data object.
* Adjusted the return logic in NodeOutputs to ensure it correctly handles the selected output state.

* fix(GenericNode): refine output selection logic to prioritize selected outputs

* Updated the output selection logic in the cleanEdges function to filter for selected outputs before finding the matching output by name. This change enhances the accuracy of output handling for generic nodes.

* updated blog writer

* fix: update Memory Chatbot configuration for improved message handling

- Adjusted JSON structure for Memory Chatbot to ensure correct output types and display names.
- Added new input fields for sender type and refined existing fields for clarity.
- Enhanced message retrieval methods to support dynamic output based on selected modes.
- Improved overall structure for better integration with Langflow components.

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

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

* [autofix.ci] apply automated fixes

* Ruff linting error fix

* [autofix.ci] apply automated fixes

* fix: Update test to reflect change in heading from "OpenAi" to "Language Model"

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2025-06-13 15:51:37 +00:00
Eric Hare
950743aaf8
fix: Add tool mode to message output (#8518)
* fix: Add tool mode to message output

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/data/url.py

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-06-13 14:15:24 +00:00
Eric Hare
955f99ac30
feat: Output DataFrame only from Directory (#8516)
* feat: Output DataFrame only from Directory

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-06-13 14:09:27 +00:00
Edwin Jose
667b370ca8
fix: update input of Language model component to support images (#8534)
* Update language_model.py

* Update language_model.py

* Update Basic Prompting.json

*  (changes-filter.yaml): add new directory 'initial_setup' to langflow components for better organization and separation of concerns

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-06-13 14:03:04 +00:00
Edwin Jose
7aee1bc1c3
refactor: use utility for BaseModel serialization and add SQL component tests (#8437)
* Update component_tool.py

* Update test_component_toolkit.py

* [autofix.ci] apply automated fixes

* Update component_tool.py

* [autofix.ci] apply automated fixes

* Update component_tool.py

* Update component_tool.py

* [autofix.ci] apply automated fixes

* fix tests

* [autofix.ci] apply automated fixes

* Update test_component_toolkit.py

* Update test_component_toolkit.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-13 01:56:57 +00:00
Edwin Jose
ca23dc4c53
fix(setup): preserve advanced attribute and generalize starter project JSON (#8529)
* update the template

* update to fix format issues
2025-06-13 01:42:52 +00:00
Eric Hare
b8f72d929d
feat: Add raw content output for File component (#8515)
* Add raw content output for File component

* Update src/backend/base/langflow/base/data/base_file.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-06-12 23:35:44 +00:00
Eric Hare
d51d379ab9
fix: Allow input connections to data components (#8517)
* fix: Allow input connections to data components

* Remove beta tag from Smart Function
2025-06-12 20:54:08 +00:00
Lucas Oliveira
1710c56e82
fix: changed truncation length for MCP tools and projects (#8494)
* updated mcp backend to truncate tools name to 30 chars

* updated frontend to truncate tools with 30 chars and truncate project name with 26 chars

* changed it to not exceed 25

* updated one click install to truncate at 26

* updated name

* used constants and helper functions to refactor code

* updated constants

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-06-12 20:33:24 +00:00
Jordan Frazier
4b48b63227
build: upgrade langchain-pinecone to be compatible with python 3.13 (#8520)
* Upgrade langchain-pinecone to be compatible with python 3.13

* Add uv pip check to workflow
2025-06-12 20:07:42 +00:00
Lucas Oliveira
b42126fc62
fix: updated tooltip side for actions (#8495)
* Updated tooltip side

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-12 17:55:52 +00:00
Lucas Oliveira
a913adc39f
fix: paste edges between components selected even if edges are not selected (#8497)
* Added pasting the edges between components selected as well

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-12 17:55:49 +00:00
Edwin Jose
892ffe6bd9
fix(input): refine input handling and improve event robustness (#8472)
* Update model_input_constants.py

* Update component.py

* [autofix.ci] apply automated fixes

* [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>
2025-06-12 17:47:18 +00:00
Eric Hare
a23c566269
fix: Show path of saved file in Save File Component (#8403)
* Show path of saved file in Save File Component

* Update src/backend/base/langflow/components/processing/save_file.py

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/save_file.py

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* [autofix.ci] apply automated fixes

* Switch to message output

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-12 15:58:25 +00:00
Edwin Jose
423caf91f1
refactor(model_input_constants): update process_inputs logic and docstring (#8470)
* Update model_input_constants.py

* 📝 Add docstrings to `lfoss-676` (#8471)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* Update model_input_constants.py

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-12 15:49:38 +00:00
Gabriel Luiz Freitas Almeida
5266f23ad3
chore(config): add .coderabbit.yaml for centralized platform settings (#8510)
add coderabbit config
2025-06-12 15:34:45 +00:00
Mendon Kissling
874002a03b
docs: v2/files does not work for images (#8512)
update-for-v2-files
2025-06-12 14:48:44 +00:00
Gabriel Luiz Freitas Almeida
ab1ed8ea01
docs: add comprehensive cursor guidelines and rules for development practices (#8401)
* Update cursor rules with specific backend, frontend, docs

* Update image example

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* update image example

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Refactor frontend development guidelines: streamline sections, remove outdated icon development instructions, and update checklist for clarity and consistency.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-12 12:51:18 +00:00
Gabriel Luiz Freitas Almeida
34c55f14b4
chore(ci): update workflow to use astral-sh/setup-uv@v6 with Python version (#8508) 2025-06-12 09:30:29 -03:00
dependabot[bot]
810a1158f2
build(deps-dev): bump brace-expansion from 1.1.11 to 1.1.12 in /src/frontend (#8500)
* build(deps-dev): bump brace-expansion in /src/frontend

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-12 11:34:00 +00:00
Jordan Frazier
e739db5143
fix: update model output type to message instead of string (#8489)
* Changed conversion methods to support the fact that LLM hint on a Message return type but return a string, causing a runtime error while converting types

* Convert to Message for model component text response

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Pedro Pacheco <pedro.pacheco@yahoo.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-12 11:23:25 +00:00
Cristhian Zanforlin Lousa
a11b3dbce7
test: remove RetrieverTool connection regression test (#8502) 2025-06-11 21:11:39 -03:00
Gabriel Luiz Freitas Almeida
7b687a0e7a
refactor: load components by importing them directly (#8395)
* refactor: update default behavior for components path in Settings class

* Set components path to an empty list when no value is provided, improving clarity in logging.
* Remove redundant addition of BASE_COMPONENTS_PATH when it is not already included.

* feat: Implement importing of Langflow components

* Added `get_langflow_components_list` to asynchronously fetch built-in components using introspection and pkgutil.
* Introduced `_get_langflow_components_list_sync` for synchronous processing of component classes.
* Updated `get_and_cache_all_types_dict` to merge fetched components into the cache.
* Enhanced error handling during module imports and component processing.

* feat: Enhance component handling in custom utils for better flexibility

* refactor: Simplify component retrieval logic and enhance error handling

* refactor: Remove unnecessary 'required_inputs' field from multiple starter project JSON files

* refactor: Change error handling to warning for component instantiation failures

* refactor: Improve component type checking in get_component_instance and run_build_config functions

* refactor: Update subclass check for custom_component in run_build_config function

* refactor: Update component name retrieval logic to prioritize class name

* refactor: Replace settings service call with direct BASE_COMPONENTS_PATH in test_get_all

* refactor: Update required inputs and improve model name info across starter projects

* [autofix.ci] apply automated fixes

* 📝 Add docstrings to `fix-component-loading` (#8397)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Build and log fixes

* refactor: Improve type checking for custom component instances in `get_component_instance`

* refactor: Enhance type checking for custom components in `run_build_config`

* refactor: Clean up docstrings in component loading functions for clarity

* refactor: Rename `get_langflow_components_list` to `import_langflow_components` for clarity

* refactor: Exclude deactivated modules and improve class checking in component loading

* test: Add component differences analysis for import_langflow_components and aget_all_types_dict

* [autofix.ci] apply automated fixes

* refactor: Simplify assert statements and improve logging in component loading tests

* [autofix.ci] apply automated fixes

* refactor: Consolidate __all__ declaration for retriever components

* refactor: Improve comments for clarity in run_build_config function

* [autofix.ci] apply automated fixes

* refactor: Enhance module validation logic in _get_langflow_components_list_sync function

* refactor: Update debug log message for clarity in get_and_cache_all_types_dict function

* refactor: Enhance parallel processing of Langflow components import and improve logging

* refactor: Improve performance testing by adding warm-up runs and clarifying output messages

* refactor: Improve assertion clarity in component loading tests and add performance benchmark

* [autofix.ci] apply automated fixes

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

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

* Use Component base class instead of custom component for a few components

* ️ Speed up function `get_component_instance` by 365% in PR #8395 (`fix-component-loading`) (#8438)

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

* [autofix.ci] apply automated fixes

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

* refactor: update debug log message for components cache building

* refactor: update required inputs to use 'api_key' for multiple starter projects

* refactor: update import statement for BaseFileComponent in nvidia_ingest.py

* refactor: simplify timing results print statement in test_load_components.py

* [autofix.ci] apply automated fixes

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

* refactor: improve assertion readability and error handling in test_load_components.py

* [autofix.ci] apply automated fixes

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

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

* feat: allow os.stat in pkgutil for component loading in blockbuster fixture

* [autofix.ci] apply automated fixes

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

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

* updates few components to new template

* import fixes

* [autofix.ci] apply automated fixes

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

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

* remove unused VectaraSelfQueryRetriverComponent from vectorstores __all__ export

* Update starter project configurations to require 'api_key' as a mandatory input for model output in multiple JSON files.

* [autofix.ci] apply automated fixes

* Refactor JSONDocumentBuilder by removing TYPE_CHECKING import and update Vectara import statement to suppress linting warning.

* ️ Speed up function `_process_single_module` by 1,017% in PR #8395 (`fix-component-loading`) (#8443)

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

* [autofix.ci] apply automated fixes

* Remove unnecessary call to `_set_output_required_inputs` in `Component` class setup

* Revert "Use Component base class instead of custom component for a few components"

This reverts commit 2fd61f92b2735a770d82eada3b429c4e20657335.

* move components to deactivated folder

AmazonKendraRetriever, JSONDocumentBuilder, ListenComponent, MetalRetrieverComponent, MultiQueryRetrieverComponent, NotifyComponent, RetrieverToolComponent, and VectaraSelfQueryRetrieverComponent

These components provide various functionalities including document building, notification handling, and integration with external APIs for data retrieval. Each component includes input specifications and error handling for robust operation.

* [autofix.ci] apply automated fixes

* Revert "move components to deactivated folder"

This reverts commit 0aa17a26d938f4a5ea622e16c4645813ea271e44.

* Implement multiple new components in the deactivated folder, including AmazonKendraRetrieverComponent, JSONDocumentBuilder, ListenComponent, MetalRetrieverComponent, MultiQueryRetrieverComponent, NotifyComponent, RetrieverToolComponent, and VectaraSelfQueryRetrieverComponent. Each component is designed to enhance functionality for document handling, notifications, and API integrations, with robust input specifications and error handling for improved reliability.

* feat: Enhance starter project loading with improved logging and error handling

* refactor: Remove debug logging for module processing in import_langflow_components

* [autofix.ci] apply automated fixes

* fix: Disable mypy error for undefined attributes in deactivated components

* feat: Enhance blocking behavior in blockbuster tests with additional function checks

* fix: Add import error handling for boto3 in S3BucketUploaderComponent

* refactor: Add debug logging for module processing in components

* fix: Temporarily disable auto-use for blockbuster fixture until blocking issue is resolved

* feat: Add utility function to check for preimported components

* fix: Update get_component_instance to accept both CustomComponent and Component types

* fix: Update import error message for boto3 installation instructions

* fix: Correct class name from VectoStoreRetrieverComponent to VectorStoreRetrieverComponent

* fix: Update Vectara type hints and import statements for consistency

* fix: Refactor get_component_instance and build_custom_component_template_from_inputs for improved error handling and component instantiation

* fix: Remove debug logging from _process_single_module to streamline module processing

* ️ Speed up function `is_a_preimported_component` by 24% in PR #8395 (`fix-component-loading`)
Here is an optimized version of your program.



**Reasoning for changes:**
- The check `isinstance(custom_component, Component)` followed by `type(custom_component) is not Component` causes the interpreter to potentially look up the type and MRO twice per call.
- By storing `type(custom_component)` in `klass` and using `issubclass(klass, Component)`, you avoid having Python walk the MRO twice for the same object, which is subtly more efficient especially in tight loops and heavy use scenarios.
- Using `issubclass()` on the object's type is semantically equivalent to `isinstance()`, except it also works for custom metaclass scenarios and is very slightly faster when type is already known.

**All program logic and comments are preserved, only the relevant portion is optimized.**

*  (freeze.spec.ts): introduce new function addFlowToTestOnEmptyLangflow to enhance test coverage and improve test reliability

*  (freeze.spec.ts): increase timeout value for waiting for "built successfully" text to appear to improve test reliability

*  (freeze.spec.ts): refactor code to check if firstRunLangflow is greater than 0 before calling addFlowToTestOnEmptyLangflow
🔧 (generalBugs-shard-9.spec.ts): update tags in test case to include @workspace and @components
♻️ (generalBugs-shard-9.spec.ts): refactor code to remove unnecessary steps related to sidebar search and node handling
🔧 (store-shard-0.spec.ts): update test cases to be skipped and improve readability by using async arrow functions

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-06-11 22:36:35 +00:00
Mike Fortman
b314ce4792
fix: restore our test shards (#8468)
* restore our test shards to 10

* update to 25
2025-06-11 21:54:52 +00:00