Commit graph

15,625 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
b1e6881fd2
fix: add conditional authorization header for dslf in curl commands (#7457)
*  (get-curl-code.tsx): add support for ENABLE_DATASTAX_LANGFLOW feature flag to include Authorization header in curl command if flag is enabled

* 🐛 (get-curl-code.tsx): fix conditional logic for adding x-api-key header in curl command to correctly handle authentication status

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-04-09 20:47:33 +00:00
Cristhian Zanforlin Lousa
b2c74173b5
Fix: Prevent Error Popups When Session Expires During Logout (#7455)
🔧 (use-get-refresh-flows-query.ts, use-get-refresh-flows.ts): Add check for AxiosError status to handle specific error case and set error message accordingly.
2025-04-09 20:45:27 +00:00
Cristhian Zanforlin Lousa
823b9448d3
Fix: Add ENABLE_IMAGE_ON_PLAYGROUND feature flag to control image upload functionality in playground environment (#7490)
 (frontend): introduce ENABLE_IMAGE_ON_PLAYGROUND feature flag to control image functionality on playground
📝 (frontend): update feature-flags.ts to include ENABLE_IMAGE_ON_PLAYGROUND flag
🔧 (frontend): update input-wrapper.tsx, use-drag-and-drop.ts, and chat-view.tsx to conditionally enable image functionality based on ENABLE_IMAGE_ON_PLAYGROUND flag

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-04-09 20:19:19 +00:00
Gabriel Luiz Freitas Almeida
0185f74276
fix: job id should be returned only if event_delivery is not direct (#7540) 2025-04-09 16:13:42 -03:00
Cristhian Zanforlin Lousa
59a7440045
fix: Resolve event delivery configuration header passing between frontend and backend (#7514)
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-09 14:58:11 -03:00
cristhianzl
467ae9e34f (tabComponent/index.tsx): add data-testid attribute with dynamic value for better testing capabilities
 (mcp-server.spec.ts): add end-to-end test for changing mode of MCP server without issues
2025-04-09 11:29:22 -03:00
Mendon Kissling
8a1b64ed77
docs: gtag management (#7491)
* remove-tag-manager

* update-gtag-tracking-id

* add-head-tag

* remove Google Analytics gtag configuration from docusaurus.config.js

* fix-hydration-error

* revert-to-easy-way

* standard-gtag

* broken-link

* refactor: streamline Google Tag Manager script configuration in docusaurus.config.js

* Apply suggestions from code review

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2025-04-08 17:16:45 +00:00
Edwin Jose
098937b7df
feat: update groq models (#7488)
update groq Models

Tested curated list of latest models
2025-04-08 16:33:59 +00:00
Gabriel Luiz Freitas Almeida
4792e569f0
tests: add "direct" event delivery method in tests (#7436)
* feat: implement direct event delivery method on the frontend

- Updated buildFlow function to include eventDelivery parameter, allowing for "direct" event delivery mode.
- Modified NodeStatus and IOModal components to utilize the new eventDelivery setting.
- Expanded flowStore and buildUtils to support event delivery options, improving flexibility in event handling.
- Added "direct" option to event delivery types in enums for better configurability.
- Updated tests to cover new event delivery modes.

* Update src/frontend/src/controllers/API/api.tsx

* Update src/frontend/src/utils/buildUtils.ts

* refactor: remove "direct" from event delivery modes in tests

- Updated the event delivery modes in the withEventDeliveryModes utility to exclude "direct", aligning with recent changes in event handling behavior.
- This change simplifies the testing setup and ensures consistency with the current application logic.

* feat: add "direct" to event delivery modes in tests

- Expanded the event delivery modes in the withEventDeliveryModes utility to include "direct", enhancing the testing coverage for this delivery method.
- This update ensures that tests reflect the latest event handling capabilities and improves the robustness of the testing framework.

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-04-08 13:13:03 +00:00
dependabot[bot]
1c7871a63c
build(deps): bump estree-util-value-to-estree from 3.3.2 to 3.3.3 in /docs (#7496)
build(deps): bump estree-util-value-to-estree in /docs

Bumps [estree-util-value-to-estree](https://github.com/remcohaszing/estree-util-value-to-estree) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/remcohaszing/estree-util-value-to-estree/releases)
- [Commits](https://github.com/remcohaszing/estree-util-value-to-estree/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: estree-util-value-to-estree
  dependency-version: 3.3.3
  dependency-type: indirect
...

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-04-08 12:18:55 +00:00
Ronnie Miller
7f42a5be36
docs: avoid building docs draft for pull requests from fork (#7493) 2025-04-07 15:01:20 -07:00
Mendon Kissling
eb4e6ae87e
docs: clean up configuration folder (#7426)
* remove-config-pages

* redirect-and-remove-from-sidebars

* add-note-about-backend-only

* redirects-and-sidebar

* fix-plaintext-linting-errors

* cli-page
2025-04-07 21:10:09 +00:00
Lucas Oliveira
a2c5090c7a
feat: adds pan and pinch nav mode like figma (#7410)
* Adds Figma pan modes

* Added selection on drag

* Changed multi selection key code to shift

* Changed tests to have correct modifiers
2025-04-07 19:15:57 +00:00
Lucas Oliveira
ced8d6d8e5
fix: removed file uploaded successfully message when no file is picked, fixed nvidia ingest message (#7441)
* Removed msg from nvidia_ingest

* Added default file picker timeout

* Use bigger timeout for file picker

* Added condition to only say that file was uploaded successfully if there are files
2025-04-07 19:15:55 +00:00
Lucas Oliveira
73302a0a1d
fix: removed cleaning edges where input with same type is hidden (#7479)
Removed function that cleaned edges if another input with the same type is hidden
2025-04-07 19:15:52 +00:00
Gabriel Luiz Freitas Almeida
eeb443bdc1
fix: Improve error handling for NVIDIA model component (#7484)
fix: ignore ConnectionError in  NVIDIA model component in case there's no internet connection

- Added logging for connection issues when accessing the NVIDIA API.
- Implemented exception handling for ConnectionError, MaxRetryError, and NameResolutionError to improve robustness and user feedback.
2025-04-07 18:40:50 +00:00
Mendon Kissling
cde01b3696
docs: add langflow desktop to install page (#7386)
* install-instructions

* numbering

* url

* get-started

* Apply suggestions from code review

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

* version-management

* order-and-style

* introduction-and-admonition

* space

* docs: update installation guide to reflect removal of cloud hosted service option

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-04-07 18:16:40 +00:00
Lucas Oliveira
e5df14875b
feat: put Shareable Playground under ENABLE_PUBLISH feature flag and removed old publish (#7482)
* Removed old toolbar

* Add enable_publish check before showing Shareable Playground

* Removed enable_publish condition on play button

* Removed enable_publish condition on playground title

* Removed unused import
2025-04-07 17:09:02 +00:00
Cristhian Zanforlin Lousa
7a7c8a14df
feat: Display flow logs timestamps in local time zone (#7477)
⬆️ (frontend): upgrade moment-timezone dependency to version 0.5.48
 (frontend): add new utility function convertUTCToLocalTimezone to convert UTC timestamps to local timezone in flowLogsModal and utils files
2025-04-07 14:47:50 +00:00
Mendon Kissling
ac8464cdb2
docs: clean up starter flows and screenshots (#7428)
* quickstart-use-parser

* update-screenshots

* blog-writer

* document-qa

* remove-math-agent-and-redirect

* other-starter-flows

* swap-message-history-and-message-store

* link

* prerequisite-language

* Apply suggestions from code review

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

* docs: update prerequisite phrasing for clarity

* add-running-instance-to-quickstart

* bullets

* quickstart-spacing

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-04-07 14:31:48 +00:00
Christophe Bornet
66996868fd
feat: Add configurable polling interval for syncing flows from FS (#7065)
* Add configurable polling interval for syncing flows from FS

* Update src/backend/base/langflow/services/settings/base.py

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

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-04-07 13:49:05 +00:00
github-actions[bot]
6e9df0b68f
chore: update test durations (#7469)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2025-04-07 09:10:35 -03:00
Lucas Oliveira
6e38033a95
fix: publish button not redirecting to right path (#7439)
* Added custom link to shareable playground

* Added correct tooltip to Shareable Playground button

* Fix typo
2025-04-04 21:17:23 +00:00
Gustavo Costa
1cb2e0684b
fix: add ENV to Dockerfile when packing flows to image (#7454)
* add ENV to Dockerfile

* 📝 (deployment-docker.md): Update formatting and indentation for better readability and consistency in the deployment Docker documentation.

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-04-04 19:11:45 +00:00
Cristhian Zanforlin Lousa
8e31fc5a8a
chore: bump langflow and langflow-base for 1.3.2 release (#7434)
upgrade langflow 1.3.2
2025-04-03 18:49:22 -03:00
Gabriel Luiz Freitas Almeida
d9ab4458ad
fix: add direct event delivery option but keep polling as default (#7435)
* feat: add new event delivery method "direct"

- Updated event_delivery options in ConfigResponse and Settings to include "direct".
- Modified build_flow function to utilize settings_service for conditional event handling.
- Improved flow processing by returning job_id or event responses based on delivery method.

* feat: implement direct event delivery method on the frontend

- Updated buildFlow function to include eventDelivery parameter, allowing for "direct" event delivery mode.
- Modified NodeStatus and IOModal components to utilize the new eventDelivery setting.
- Expanded flowStore and buildUtils to support event delivery options, improving flexibility in event handling.
- Added "direct" option to event delivery types in enums for better configurability.
- Updated tests to cover new event delivery modes.

* fix: change default event delivery method to "polling"

- Updated the default value of event_delivery in Settings from "direct" to "polling" to align with intended behavior.
- Ensured documentation reflects the change in default settings for clarity on event delivery options.

* Update src/frontend/src/controllers/API/api.tsx

* Update src/frontend/src/utils/buildUtils.ts

* Update src/frontend/src/utils/buildUtils.ts

* Update src/frontend/src/utils/buildUtils.ts

* feat: add event delivery validation for multi-worker environments

- Introduced a new field validator for the `event_delivery` setting to enforce "direct" delivery when the number of workers exceeds one.
- This change ensures compatibility with multi-worker setups, improving the robustness of event handling in the application.

* feat: add warning for multi-worker event delivery

- Added a warning log in the Settings class to notify users when a multi-worker environment is detected, indicating that "direct" event delivery will be used. This enhances visibility and understanding of event handling behavior in such setups.

* refactor: remove "direct" from event delivery modes in tests

- Updated the event delivery modes in the withEventDeliveryModes utility to exclude "direct", aligning with recent changes in event handling behavior.
- This change simplifies the testing setup and ensures consistency with the current application logic.

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-04-03 21:05:39 +00:00
Edwin Jose
8b4cf7b1db
feat: Composio Gmail component and AuthInput feature (#7364)
* old composio Gmail component

* Update gmail_composio.py

* [autofix.ci] apply automated fixes

* Removed input types from secret input

* Changed starter projects

* Update gmail_composio.py

* composio base

* [autofix.ci] apply automated fixes

* updated composio with multi output

* [autofix.ci] apply automated fixes

* fix lint errors

* [autofix.ci] apply automated fixes

* Added sortableList and connect to frontend types constant

* Added AuthInput to backend and frontend constant

* Added auth input to InputTypes and added show = false by default

* fix: Update Composio icon (#7407)

fix: update Composio icon dimensions and simplify SVG structure

* Fix amber color

* Fix button and voice assistant button to use correct design and colors

* Fixed button design to include bg

* remove bg definition from voice assistant

* Added auth input to composio base

* Added helper text to sortable list

* Add unlink icon

* Add node connection button

* Changed to isPolling

* [autofix.ci] apply automated fixes

* Added auth tooltip

* Added auth tooltip to mixinn

* Add auth mixin to input

* update the field visibility

* Fixed disconnect

* Update composio_base.py

* Updated node status to show correct statuses

* Added handling for API errors and disconnections

* limit to dataframe output

* add basic tests for base and gmail component

* fix lint errors

* 📝 (test files): Remove unnecessary blank lines to improve code readability and consistency.

* Add result_field to GMAIL_FETCH_EMAILS action and change how result key is used

* fix: Add validation for result structure in ComposioGmailAPIComponent

* fix: Ensure result is a list of dicts before converting to DataFrame in ComposioBaseComponent

* feat: Introduce get_result_field option for Gmail actions to control result retrieval behavior

* Fixed status not updating in real time

* Added default API value to Composio

* Made sortableList only be openable if no helper text is present

* fix: Update validation logic in ComposioGmailAPIComponent to incorporate get_result_field option for improved result handling

* Fixed bug where pre-filled Global Variable didn't trigger login

* refactor: Remove commented-out output definitions in ComposioBaseComponent for cleaner code

* refactor: Clean up ComposioGmailAPIComponent by removing outdated comments for improved readability

*  (NodeStatus/index.tsx): refactor getConnectionButtonClasses and getConnectionIconClasses functions to improve code readability and maintainability

* ♻️ (NodeStatus/index.tsx): refactor getConnectionButtonClasses and getConnectionIconClasses functions to use arrow function syntax for better readability and maintainability

* 🔧 (NodeStatus/index.tsx): define constants POLLING_TIMEOUT and POLLING_INTERVAL for better readability and maintainability

*  (ListSelectionComponent): Add dataTestId prop to ListItem component for better testing
📝 (NodeStatus): Refactor data-testid value to be dynamically generated based on node status
📝 (searchBarComponent): Add data-testid attribute to search input for testing purposes
📝 (sortableListComponent): Add data-testid attribute to button for opening list selection
♻️ (utils.ts): Add testIdCase function to convert string to snake_case for test ids
📝 (composio.spec.ts): Add various test cases for interacting with composio component

*  (test_gmail.py): add MagicMock import to fix missing dependency for testing
🔧 (test_gmail.py): refactor execute_action method to return a structure compatible with component's logic
♻️ (test_gmail.py): refactor _build_wrapper method to return a mock for the toolset
 (test_gmail.py): add patching for _actions_data to ensure correct structure for GMAIL_FETCH_EMAILS
🔧 (test_gmail.py): refactor execute_action method to return mock data for testing as_dataframe method
🔧 (test_gmail.py): refactor as_dataframe method to handle mock email data and verify DataFrame content
🔧 (test_gmail.py): refactor execute_action method to return mock data for testing update_build_config method
🔧 (secretKeyModal/index.tsx): remove unused imports and clean up the file structure

* [autofix.ci] apply automated fixes

---------

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: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-04-03 19:38:04 +00:00
Gustavo Costa
f9a7c9bcef
Fix: add insert mode MongoDB (#7394)
* add dropdown inser mode, create method __insert_mode

* fix unit_test mongodb

* add info to index_name

* to overwrite, delete_many from collection

* create verify_search_index

* fix SIMILARITY_OPTIONS

* fix documentation components-vector-stores.md
2025-04-03 19:03:17 +00:00
Cristhian Zanforlin Lousa
f4a07fac69
feat: add customization components (#7419)
*  (webhookFieldComponent): Add support for ENABLE_DATASTAX_LANGFLOW feature flag to conditionally show generate token button
🐛 (use-get-config): Set default value for webhook polling interval if not provided in data
♻️ (custom-secret-key-modal-button): Refactor to pass modal props as a separate object to improve readability and maintainability
🔧 (use-generate-token): Add new file for generating token function
🔧 (secretKeyModal): Refactor to use generate token function based on ENABLE_DATASTAX_LANGFLOW flag and separate modal props into a dedicated interface

*  (constants.ts): add default polling interval and timeout constants for better code readability and maintainability
♻️ (use-get-config.ts): refactor to use the newly added default constants for polling interval and timeout to improve code consistency and reduce duplication

* 🐛 (typescript_test.yml): update the maximum shard count calculation to be 25 instead of 10 to improve test distribution and efficiency

* ⚙️ (typescript_test.yml): adjust optimal shard count calculation to ensure a maximum of 10 shards for test execution
♻️ (index.tsx): refactor modalConfigProps assignment to handle cases where modalProps is null or undefined

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-04-03 18:56:46 +00:00
Mike Fortman
59f74e894f
fix: move home assistants to bundle (#7430)
* move home assistants to bundle

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-03 18:34:28 +00:00
Mendon Kissling
225eb8c7d7
docs: mcp integration claude path (#7409)
* clarify-path-instructions

* will

* Apply suggestions from code review

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

* paths-numbered-steps-not-bullets

---------

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2025-04-03 17:15:32 +00:00
Jason Liu
cd04a5e123
fix: Fixed typo in mcp host setup (#7423)
Update mcp.py

-fix: holst name error,alter :holst->host
2025-04-03 13:12:44 +00:00
Lucas Oliveira
4dcbd7c168
fix: removed handle from sortableinput and connectinput (#7404)
Added sortableList and connect to frontend types constant
2025-04-03 12:57:53 +00:00
Garrett George
9ec37f92c9
Fix: Fixes bug with RedisCache init and serialization (#7092)
* Fixes bug with RedisCache init and serialization

* [autofix.ci] apply automated fixes

* Removes duplicate get_service call

---------

Co-authored-by: Garrett George <ggeorge@pros.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-02 20:28:17 +00:00
Mendon Kissling
f261b739a9
docs: update arize phoenix variable (#7383)
* phoenix-api-key

* space

* add-tabs

* finish-sentence

* numbering

* code-review
2025-04-02 20:26:17 +00:00
Lucas Oliveira
f11a89c701
fix: removed dependency from useEffect that causes chat input to be cleared (#7393)
* Removed flowPool from dependencies of function that clears chat input

* remove console.log

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-04-02 20:03:54 +00:00
dependabot[bot]
ea6022d757
build(deps): bump image-size from 1.2.0 to 1.2.1 in /docs (#7408)
Bumps [image-size](https://github.com/image-size/image-size) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/image-size/image-size/releases)
- [Commits](https://github.com/image-size/image-size/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: image-size
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 19:58:12 +00:00
Deon Sanchez
b0a9b6e8ab
fix: fixes dropdown refreshList not working properly (#7395)
* feat: add nodeId, nodeClass, and handleNodeClass props to dropdown and string render components

* fix: remove extraneous flag from package-lock.json and add nodeId, nodeClass, handleNodeClass props to ParameterRenderComponent

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-04-02 19:32:52 +00:00
Gabriel Luiz Freitas Almeida
43bdfdc7ac
feat: Enhance StructuredOutputComponent and add trustcall dependency (#7249)
* chore: Add trustcall dependency to pyproject.toml

* fix: Update bind_tools method to include optional tool_choice parameter for enhanced flexibility in tool binding

* refactor: Update StructuredOutputComponent to utilize create_extractor for structured output and enhance result handling

* Replaced direct call to with_structured_output with create_extractor for improved flexibility.
* Added handling for "responses" in result to ensure proper data extraction.
* Introduced is_last_pydantic_output_parser method to check parser type in structured output processing.

* test: Add comprehensive tests for StructuredOutputComponent with OpenAI and NVIDIA models

* Implemented multiple test cases for StructuredOutputComponent using real OpenAI and NVIDIA models.
* Added tests for simple, complex, and nested schemas to validate structured output extraction.
* Included error handling tests to ensure proper response to model limitations and API errors.
* Utilized pytest for conditional test execution based on environment variables for API keys.

* refactor: Update JSON starter projects to include StructuredOutputComponent with enhanced input and output handling

* Integrated StructuredOutputComponent into Financial Report Parser and Portfolio Website Code Generator starter projects.
* Updated input fields to include detailed descriptions and requirements for structured output generation.
* Ensured consistent schema definitions and improved error handling for model limitations.
* Enhanced documentation for better clarity on component usage and expected outputs.

* [autofix.ci] apply automated fixes

* refactor: Remove unused PydanticOutputParser method from StructuredOutputComponent

* Deleted is_last_pydantic_output_parser method as it was no longer necessary for structured output processing.
* Cleaned up the code to enhance maintainability and readability.

* refactor: Update JSON starter projects to enhance StructuredOutputComponent integration

* Refactored Financial Report Parser and Portfolio Website Code Generator to streamline the StructuredOutputComponent.
* Removed unused PydanticOutputParser method to improve code clarity and maintainability.
* Enhanced input descriptions and requirements for structured output generation.
* Improved error handling and documentation for better user guidance.

* [autofix.ci] apply automated fixes

* refactor: Simplify response handling in StructuredOutputComponent

* Updated the response extraction logic to use the walrus operator for cleaner code.
* Improved readability by replacing the previous conditional check with a more concise approach.
* Ensured consistent handling of structured output results.

* [autofix.ci] apply automated fixes

* refactor: Remove unnecessary TYPE_CHECKING import and simplify type casting in StructuredOutputComponent

* Eliminated the TYPE_CHECKING import for improved clarity.
* Simplified the type casting of the language model in the response extraction logic.
* Enhanced code readability and maintainability.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* refactor: reorder response handling in StructuredOutputComponent for clarity

* refactor: unify StructuredOutputComponent code across multiple starter projects for consistency

* Standardized the implementation of StructuredOutputComponent in Financial Report Parser, Image Sentiment Analysis, Market Research, and Portfolio Website Code Generator.
* Enhanced code clarity and maintainability by ensuring uniformity in input and output definitions across these components.

* refactor: update build_structured_output method in StructuredOutputComponent to include text_key

* Modified the build_structured_output method to return a Data object with a text_key for improved clarity in output structure.
* Ensured consistency across various starter projects by aligning the output format of StructuredOutputComponent.

* [autofix.ci] apply automated fixes

* 🔧 (structured_output.py): refactor create_extractor function to support structured data extraction in a specific format specified by schema_name
💡 (structured_output.py): add tool_description variable to provide a description for the structured data extraction tool

* [autofix.ci] apply automated fixes

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

* ♻️ (structured_output.py): refactor code to simplify the creation of extractor with tools parameter and remove unnecessary tool_description and schema_name variables.

* [autofix.ci] apply automated fixes

*  (structured_output.py): enhance documentation by adding a dynamic docstring to the output model creation, improving clarity on the schema's purpose.

*  (structured_output.py): update structured output component across multiple starter projects to enhance consistency and clarity in output schema definitions. Improved documentation and dynamic docstring integration for better understanding of the structured data extraction process.

* 🔧 (typescript_test.yml): enhance test command by adding retries to Playwright tests for improved stability and reliability during CI runs. Cleaned up whitespace for better readability.

* feat: add sample resume for testing and update test to use new file

---------

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-04-02 18:50:28 +00:00
Lucas Oliveira
0d00fe8f12
fix: add correct amber colors and button design (#7413)
* Fix amber color

* Fix button and voice assistant button to use correct design and colors

* Fixed button design to include bg

* remove bg definition from voice assistant
2025-04-02 18:41:01 +00:00
Deon Sanchez
eed0a5c404
fix: Update Composio icon (#7407)
fix: update Composio icon dimensions and simplify SVG structure
2025-04-02 15:58:09 +00:00
Gabriel Luiz Freitas Almeida
aa49028fae
chore: bump langflow for 1.3.1 (#7392)
* bump langflow and langflow-base

* bump langflow frontend
2025-04-01 20:18:11 +00:00
Ítalo Johnny
31f95820d6
fix: typo in Alembic enum type declaration (#7380)
fix: typo in alembic enum type
2025-04-01 19:49:02 +00:00
YAMON.IO
e2d0ec865a
feat: add HomeAssistant components (#5803)
* Add Homeassistant Component

https://www.home-assistant.io/

* Add files via upload

* Add files via upload

* refactor: rename Home Assistant control and state listing components

Introduced two new components for Home Assistant integration:
1. HomeAssistantControl: A tool for controlling Home Assistant devices, allowing actions like turn_on, turn_off, and toggle with specified entity IDs.
2. ListHomeAssistantStates: A tool to retrieve the current states of Home Assistant entities, with optional filtering by domain.

Both components include necessary input fields and documentation links for user guidance.

* refactor: format Home Assistant SVG component and index file for consistency

* fix: spread props in Home Assistant SVG component for better customization

* refactor: update Home Assistant icon and improve SVG structure for better readability

---------

Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-04-01 19:47:53 +00:00
Mendon Kissling
413e855d22
docs: move mcp up in integrations sidebar (#7389)
integrations-sidebar-move-mcp
2025-04-01 19:44:31 +00:00
Cristhian Zanforlin Lousa
c1c6bfa478
fix: centralize OpenAI voice definitions and fix voice array state loading in voice assistant (#7390)
 (constants.ts): add new constants for OpenAI voices to be used in the application
🔧 (audio-settings-dialog.tsx, voice-select.tsx, check-provider.ts, voiceStore.ts): import and use the newly added OpenAI voices constants in various components and store to improve maintainability and consistency in voice selection functionality
2025-04-01 19:22:25 +00:00
Lucas Oliveira
e58f764f3d
fix: handle backend connection errors on build (#7387)
* Changed polling build error handling

* Awaited pollBuildEvents for error to be thrown

* fix: enhance error handling and logging in get_flow_events_response

* fix: introduce custom exception for job queue not found error

* fix: replace ValueError with custom JobQueueNotFoundError in get_flow_events_response

* ️ Speed up method `JobQueueService.get_queue_data` by 1,704% in PR #7387 (`fix/be_connection_errors`) (#7388)

To optimize the `JobQueueService` implementation for better runtime and memory efficiency, we can implement some optimizations focused mainly on avoiding redundant checks and streamlining the handling of job queues. The most significant improvement that can be made without altering the functionality would be to remove redundant error logging and to optimize our coroutine handling.

Here is the optimized version.



### Key Changes.
1. **Removed Redundant Logging**: The error logging inside the `get_queue_data` method was removed. In a production system where performance is critical, it’s often better to rely on exception handling rather than logging each potential error before raising the exception, especially for common errors which can be anticipated by the system. Instead, we directly raise `JobQueueNotFoundError`.
   
2. **Streamlined Exception Handling**: Replaced the dictionary lookup and manual check with a try-except block, simplifying the code and ensuring that the KeyError is handled efficiently. This avoids checking the condition and then looking up the dictionary again.

3. **Retained Essential Functionality**: All core functionalities and method signatures have been maintained, ensuring that the refactored code behaves identically to before. This includes maintaining the `self._closed` check to prevent operations on a closed service and handling of exceptions to provide appropriate error messages.

By focusing on reducing redundant operations like extra logging and double-checking conditions, we improve the software’s runtime performance and maintain cleaner code.

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

* fix: improve error handling in JobQueueService by raising JobQueueNotFoundError with original exception context

* fix: update error message for job not found in test cases

* fix: enhance error handling in cancel_build by adding JobQueueNotFoundError exception

* fix: improve error handling in cancel_build by logging JobQueueNotFoundError details

---------

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-04-01 19:04:54 +00:00
Jordan Frazier
4162d11710
docs: fix localhost address for NIM docs (#7391)
Fix localhost address for NIM docs
2025-04-01 18:37:58 +00:00
Deon Sanchez
6dac50a3fc
feat: composio clean up 🧹 (#7371)
* feat: enhance animations and improve ListSelectionComponent functionality

- Added overlay and content animations to tailwind.config.mjs for smoother transitions.
- Updated ListSelectionComponent to reset search input when the dialog opens and improved item display styling.
- Refactored ConnectionComponent to utilize the new onSelection prop in ListSelectionComponent for better selection handling.

* fix: refine animation timings and enhance ListSelectionComponent layout

- Adjusted animation durations in tailwind.config.mjs for smoother transitions.
- Updated ListSelectionComponent to increase maximum height for improved content display.

* feat: enhance ListSelectionComponent with hover functionality and keyboard navigation

- Added mouse enter and leave handlers to ListItem for improved user interaction.
- Implemented keyboard navigation to select items using the Enter key when an item is hovered.
- Updated styling for ListItem to enhance visual feedback during hover states.

* feat: enhance ListItem with hover state and selection feedback

- Added hover state management to ListItem, allowing visual feedback when an item is hovered.
- Updated the rendering logic to display a "Select" label and an icon when the item is hovered.
- Improved the selection indicator for better user experience.

* feat: enhance ListSelectionComponent with keyboard navigation and focus management

- Added keyboard navigation to allow users to select items using the Arrow keys and Enter key.
- Implemented focus management to highlight the currently focused item in the list.
- Updated the component to reset focus and search input when the dialog opens or the filtered list changes.
- Improved item rendering to visually indicate focus state.

* feat: enhance ListSelectionComponent with improved keyboard navigation and hover management

- Added state management for keyboard navigation to improve user experience when selecting items.
- Implemented hover state clearing during keyboard navigation to prevent visual conflicts.
- Updated ListItem to conditionally apply hover styles based on keyboard navigation state.
- Enhanced focus management to reset when the filtered list changes or when the dialog opens.

* fix: refine animation timings and update ListSelectionComponent layout

- Adjusted clipPath values in tailwind.config.mjs for improved overlay animations.
- Increased animation durations for overlay and content transitions to enhance smoothness.
- Removed unnecessary padding in ListSelectionComponent for a cleaner layout.

* refactor: update ListSelectionComponent styles for improved visual consistency

- Changed text color and background color classes in ListItem to enhance readability and maintain design consistency.
- Updated icon color to align with the new text styling for better visual integration.

* [autofix.ci] apply automated fixes

* fix: improve ListSelectionComponent behavior and cleanup event listeners

* fix: adjust minimum height of ListSelectionComponent dialog for better usability

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-01 18:28:06 +00:00
Gabriel Luiz Freitas Almeida
7a87880e49
tests: add tests for streaming calls on api/v1/run (#7385)
* test: add concurrent streaming request tests for chat input type

Implemented a new test for concurrent streaming requests to the run endpoint with chat input type. Added a helper coroutine to validate the streaming response, ensuring proper event handling and result verification. This enhances the test coverage for the streaming functionality.

* refactor: replace session_getter with session_scope in API key CRUD operations

Updated the API key CRUD operations to utilize session_scope instead of session_getter for better session management. This change enhances the clarity and robustness of the database interactions.

* test: enhance assertions and error handling in streaming tests

Refactored assertions in the streaming tests to provide clearer error messages and improve robustness. Added error handling for JSON parsing in the stream response and ensured that all expected fields are validated with informative messages. Updated the test for concurrent streaming requests to use the correct project ID and modified input values for better clarity.

* test: refactor get_starter_project fixture for improved session management and data handling

Updated the `get_starter_project` fixture to use `session_scope` for better session management. Enhanced the flow data processing by replacing the OpenAI API key and ensuring the `load_from_db` flag is set to false, improving robustness and clarity in test setup.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-01 17:31:26 +00:00