Commit graph

15,054 commits

Author SHA1 Message Date
Vinícios Batista da Silva
bfdb2fd90e
feat(openai): make api_key field required on OpenAI Model (#5854)
* feat(openai): make api_key field required

- Add required=True to api_key field in OpenAI model component
- Ensure proper authentication by making API key mandatory

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

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-22 15:23:29 +00:00
github-actions[bot]
c9d5b6f9f3
chore: update test durations (#5857)
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-22 15:19:57 +00:00
Gabriel Luiz Freitas Almeida
4ff34b6cc9
fix: make sure graph build errors bubble up to the frontend (#5864)
fix: Add handling for None value in validate_source method to return default Source instance
2025-01-22 15:14:37 +00:00
Mattias Michaux
cdf85e55de
fix: add the git binary to the final step of the container images (#5863)
Add the git binary to the runtime images
2025-01-22 15:07:34 +00:00
Cristhian Zanforlin Lousa
c01452f890
refactor: adjust SliderComponent spacing and typography (#5836)
🐛 (sliderComponent/index.tsx): adjust styling to fix alignment issue with input element in SliderComponent

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-22 14:37:25 +00:00
Gabriel Luiz Freitas Almeida
16448e4247
ci: Automatically close existing PRs for test duration updates (#5852)
ci: add step to close existing PRs before creating a new one for test duration updates

- Introduced a new step in the GitHub Actions workflow to automatically close any open pull requests titled "chore: update test durations" before creating a new pull request.
- This change ensures that only one pull request for updating test durations is active at a time, streamlining the workflow and reducing potential merge conflicts.
2025-01-22 13:10:45 +00:00
Raphael Valdetaro
a3fe2fec90
refactor(components): Rename Parse Data component to Data to Message (#5547)
* refactor(components): Rename Parse Data component to Data to Message

* Refactor: enhance Data to Message description

* Refactor: enhance Data to Message description

* feat: add required to template and data inputs

* [autofix.ci] apply automated fixes

* fix: Update element selectors in freeze.spec.ts

* [autofix.ci] apply automated fixes

* refactor: rename test IDs for processing data in frontend tests

Updated test IDs from "processingParse Data" to "processingData to Message" across multiple test files to improve clarity and consistency in the test suite. This change enhances the readability of the tests related to data processing components.

* refactor: update ParseDataComponent to improve clarity and consistency

- Renamed the display name and description of the ParseDataComponent from "Data to Message" to "Parse Data" to better reflect its functionality.
- Changed the icon from "message-square" to "braces" for a more appropriate visual representation.
- Updated input fields to make 'required' status consistent across multiple starter projects, changing 'required' from true to false for 'data' and 'template' inputs.
- Enhanced code readability by modifying the structure and comments within the component's implementation across various JSON files.

* refactor: update ParseDataComponent across multiple starter projects

- Changed the display name and description of the ParseDataComponent from "Parse Data" to "Data to Message" for better clarity.
- Updated the icon from "braces" to "message-square" to better represent the component's functionality.
- Made input fields 'data' and 'template' required across all affected JSON files to ensure proper data handling.
- Enhanced code readability and consistency in the implementation of the ParseDataComponent across various starter projects.

*  (freeze.spec.ts): Update test descriptions and selectors to match changes in the application functionality related to data processing and messaging
 (stop-building.spec.ts): Update test description and selector to match changes in the application functionality related to data processing and messaging
 (fileUploadComponent.spec.ts): Update test description and selector to match changes in the application functionality related to data processing and messaging
 (loop-component.spec.ts): Update test description and selector to match changes in the application functionality related to data processing and messaging

* fix broken tests

---------

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: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-01-22 12:22:53 +00:00
Cristhian Zanforlin Lousa
26de4c7097
feat: Update and reorganize starter templates (#5856)
* update openAI templates

* update components

* update templates

* Update starter projects with OPENAI_API_KEY value

* add notes to graph rag

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-01-22 01:56:11 +00:00
anovazzi1
7fa980e5fc
fix: Update memoization logic in ChatView component to prevent scroll bug (#5764)
refactor: Update memoization logic in ChatView component

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-01-22 01:15:19 +00:00
Lucas Oliveira
6f04e5783c
fix: removed auto height to fix glitch on Edit Tools (#5815)
Removed auto height from table node component

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-22 01:14:57 +00:00
dependabot[bot]
14773bb391
chore(deps): bump undici from 6.21.0 to 6.21.1 in /src/frontend (#5855)
Bumps [undici](https://github.com/nodejs/undici) from 6.21.0 to 6.21.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 01:13:31 +00:00
github-actions[bot]
0488ff2483
chore: update test durations (#5827)
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-22 01:13:00 +00:00
Edwin Jose
5ce4f514e3
feat: add google generative ai models to agent component (#5853)
* add google generative ai to agents

* [autofix.ci] apply automated fixes

* format error fixed

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 22:08:21 +00:00
Lucas Oliveira
3a1a6a1066
Revert "fix: change border color on chat input when active" (#5838)
Revert "fix: change border color on chat input when active (#5814)"

This reverts commit d4b9a3f15b.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-21 21:25:49 +00:00
Dmitry
c688924fba
docs: Fix duplicate numbering in "Run Langflow" section (#5844)
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-01-21 21:08:28 +00:00
anovazzi1
84cad2cbbc
fix: update YouTube icon name in sidebar bundles (#5817)
refactor: Correct capitalization of YouTube icon name in sidebar bundles

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-01-21 21:07:05 +00:00
dependabot[bot]
258096207b
chore(deps-dev): bump vite from 5.4.11 to 5.4.14 in /src/frontend (#5851)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.14/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 21:00:18 +00:00
Cristhian Zanforlin Lousa
e34f39ac75
test: update data-testid attributes for chat memory and OpenAI model elements (#5823)
* 🐛 (generalBugs-shard-9.spec.ts): fix incorrect test selector for elementChatMemoryOutput to match updated element ID
🐛 (generalBugs-shard-3.spec.ts): fix incorrect test selector for elementsOpenAiOutput to match updated element ID

* 📝 (refreshButton.tsx): add data-testid attribute to RefreshButton component for testing purposes
🐛 (Vector Store.spec.ts): fix import statement to include 'expect' in Playwright test file
🐛 (Vector Store.spec.ts): remove unnecessary test.skip block for ASTRA_DB_API_ENDPOINT
🐛 (Vector Store.spec.ts): fix selectors and interactions for refresh buttons and dropdown options in Playwright test file

*  (freeze-path.spec.ts): refactor test cases to use a new helper function moveSlider for interacting with slider elements in a more efficient and readable way
2025-01-21 20:45:10 +00:00
Jordan Frazier
471b8e2f6f
feat: add retry on database connection (#5772)
* Add retry to database connection

* [autofix.ci] apply automated fixes

* fix comments

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 20:41:17 +00:00
Gabriel Luiz Freitas Almeida
c29e6ad3d5
fix: Improve TracingService initialization logic around deactivated (#5847)
* fix: improve TracingService initialization logic

- Updated the `start` method to remove the check for `self.deactivated`, allowing the service to start even if deactivated.
- Added a check in `initialize_tracers` to return early if the service is deactivated, preventing unnecessary initialization calls.

These changes streamline the service's startup process and ensure that tracer initialization respects the deactivated state.

* [autofix.ci] apply automated fixes

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

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 20:38:29 +00:00
dependabot[bot]
25bf7f9010
chore(deps): bump katex from 0.16.18 to 0.16.21 in /src/frontend (#5771)
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.18 to 0.16.21.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.18...v0.16.21)

---
updated-dependencies:
- dependency-name: katex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 20:27:36 +00:00
Raphael Valdetaro
bd8dbdfab6
feat: add arxiv component (#5634)
* feat: add arxiv component

* [autofix.ci] apply automated fixes

* test: add initial test suite for arxiv component

* fix: correct test formatting for ArXiv component

* fix: implement tests for ArXivComponent following TestBatchRunComponent pattern

* fix: ArXivComponent test formatting

* [autofix.ci] apply automated fixes

* refactor: update imports and skip version tests for new component

* fix: fix line breaks in test file

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 20:20:26 +00:00
Tejas Shah
71b8c762a2
docs: Adds documentation for Opensearch vector store component (#5681)
Adds documentation for Opensearch vector store component

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-01-21 19:57:25 +00:00
Cristhian Zanforlin Lousa
aa7eb90d94
feat: Update basic examples (#5846)
* fix examples - simple agent

* update templates

* formatting
2025-01-21 19:44:08 +00:00
Deon Sanchez
a06cca4a8c
feat: add dialog support to dropdown components and enhance AstraDB (#5349)
* feat: add dialog support to dropdown components and enhance AstraDB integration

- Introduced a new NodeDialog component for improved user interaction when connecting to Astra DB.
- Updated AstraDBVectorStoreComponent to include a dialog option for creating new collections.
- Enhanced dropdown components to support dialog functionality, allowing users to create new options directly from the dropdown.
- Added `hasDialog` property to relevant component types to manage dialog visibility.
- Refactored utility functions to support new naming conventions and improve code clarity.

* [autofix.ci] apply automated fixes

* Remove creation parameters, add new inputs for dialog

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update the mixins for dialog_inputs

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* refactor: standardize JSON formatting and clean up input types in Vector Store RAG configuration

- Reformatted JSON structure for better readability, ensuring consistent indentation and line breaks.
- Updated input types across various components to use array notation for clarity.
- Removed extraneous entries in package-lock.json to streamline dependencies.
- Enhanced overall maintainability of the configuration files.

* Add new options_metadata field to dropdown mixin

* Update test_astra_component.py

* Properly set dictionary mapping

* Update astradb.py

* Fix collection loading

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* [autofix.ci] apply automated fixes

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

* Enhance AstraDB integration and update dropdown components

- Updated the AstraDBVectorStoreComponent to include new input fields for database and collection creation, with default options for selection.
- Refactored dropdown components to support dynamic dialog inputs, improving user interaction for creating new options and refreshing lists.
- Updated package-lock.json to reflect dependency upgrades, including Rollup and SWC packages.

This commit improves the functionality and usability of the AstraDB integration and dropdown components, ensuring a smoother user experience.

* Update astradb.py

* Fix autodetection

* Enhance dropdown components to support options metadata

- Added `optionsMetaData` prop to Dropdown and DropdownComponent for improved data handling.
- Updated rendering logic in Dropdown to display metadata alongside options, enhancing user experience.
- Modified type definitions to include `optionsMetaData` in relevant components.

These changes improve the flexibility and usability of dropdown components, allowing for richer data presentation.

* Refactor and enhance AstraDB integration and dropdown components

- Updated the `Vector Store RAG.json` configuration for improved formatting and consistency in output and input types.
- Enhanced the `NodeDialogComponent` to accept `dialogInputs` as a prop, allowing for more dynamic content rendering.
- Modified the `Dropdown` component to use `onSelect` instead of `onClick` for better accessibility and user interaction.
- Improved rendering logic in the `Dropdown` component to conditionally display icon options based on the presence of `dialogInputs`.

These changes enhance the usability and flexibility of the AstraDB integration and dropdown components, providing a more intuitive user experience.

* Don't inherit from dict input in new inputs

* [autofix.ci] apply automated fixes

* Update astradb.py

* update logic for dropdown

* Fix the number of records per collection

* Update astradb.py

* [autofix.ci] apply automated fixes

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

* feat: Enhance Dropdown and Parameter Render Components

- Updated Dropdown component to integrate post template value handling and refresh functionality.
- Refactored ParameterRenderComponent to conditionally render based on dialog inputs.
- Improved DropdownComponent to accept additional props for better flexibility.

These changes improve the overall functionality and usability of the dropdown components within the application.

* Set unknown to none to hide unavailable fields

* Update astradb.py

* Refactor Dropdown Component for Enhanced Usability

- Removed unnecessary state initialization and improved code readability.
- Updated button elements within the dropdown to enhance user interaction.
- Added loading state indication for the refresh button.
- Filtered out null values from options metadata for cleaner rendering.

These changes streamline the dropdown functionality and improve the user experience.

* Refactor NodeDialog, Dropdown, and ParameterRender Components

- Commented out debug logs in NodeDialogComponent to clean up console output.
- Enhanced Dropdown component to conditionally render icon options based on dialog inputs.
- Updated ParameterRenderComponent to check for the length of dialog inputs before rendering.

These changes improve code readability and ensure components behave correctly based on input conditions.

* [autofix.ci] apply automated fixes

* Cleanup some tests

* Fix ruff style issue

* [autofix.ci] apply automated fixes

* Fix environment specification

* [autofix.ci] apply automated fixes

* Update starter project template

* Update astradb.py

* Remove backwards compatibility features

* [autofix.ci] apply automated fixes

* Small tweak to autodetect

* [autofix.ci] apply automated fixes

* Refactor NodeDialogComponent to Dynamically Render Inputs

- Replaced static content in NodeDialogComponent with dynamic rendering based on dialogInputs.
- Introduced NodeInputField and RenderInputParameters components for better modularity.
- Enhanced footer with Cancel and Save buttons, improving user interaction.

These changes enhance the flexibility and usability of the NodeDialogComponent, allowing it to adapt to varying input configurations.

* Refactor NodeDialogComponent: Remove Unused Imports

- Commented out unused imports in NodeDialogComponent to clean up the code.
- This change enhances code readability and prepares the component for future updates.

No functional changes were made; the focus was on improving code quality.

* Refactor Dropdown and ParameterRender Components for Improved Readability and Functionality

- Renamed functions in Dropdown component for clarity: `renderOptionsList` and `renderCreateOptionDialog` to `oldRenderOptionsList` and `renderCustomOptionDialog`, respectively.
- Enhanced the rendering logic in Dropdown to streamline the display of options and metadata.
- Simplified the return structure in ParameterRenderComponent to always render the RefreshParameterComponent, improving code consistency.
- Updated RefreshParameterComponent to conditionally display the refresh button based on the presence of dialog inputs.

These changes improve code readability and maintainability while ensuring consistent behavior across components.

* [autofix.ci] apply automated fixes

* Add the new naming conventions to deletion fields

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Add new cloud provider options for database creation

* [autofix.ci] apply automated fixes

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

* Make dialog inputs a dictionary of inputs

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* [autofix.ci] apply automated fixes

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

* Update astradb.py

* [autofix.ci] apply automated fixes

* added mock data for testing

* Clean up the reactive flow

* [autofix.ci] apply automated fixes

* Fix the dialog inputs

* Update Vector Store RAG.json

* Update Vector Store RAG.json

* Update astradb.py

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update astradb.py

* Update astradb.py

* Switch dialog inputs from list to dictionary

* Update astradb.py

* Refactor NodeDialogComponent to utilize useDialogSubmit hook for handling dialog submissions and streamline input rendering. Remove unused props and mock data, enhancing clarity and maintainability. Update DropdownComponent to remove unnecessary content prop. Introduce useDialogSubmit hook for improved API interaction and loading state management.

* New structure for dialog inputs

* [autofix.ci] apply automated fixes

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

* No need for the input type on token

* Flip order of ingest and search

* [autofix.ci] apply automated fixes

* Remove id field from factory

* Remove other id field

* [autofix.ci] apply automated fixes

* Refactor directory_reader.py to simplify file filtering logic

* Refactor flowSidebarComponent to filter out bundles and custom components in CategoryGroup

* [autofix.ci] apply automated fixes

* Refactor NodeDialogComponent to utilize dialogInputs directly, removing mock data and enhancing parameter rendering. Update Dropdown and ParameterRenderComponent types to accept single dialogInputs object. Remove unused useDialogSubmit hook.

*  (NodeDialogComponent/index.tsx): Introduce handleNewValue function to handle updating node template values based on user input
🔧 (NodeDialogComponent/index.tsx): Add support for process.env.PORT environment variable to be able to run app on a configurable port
🔧 (dropdownComponent/index.tsx): Add nodeId prop to Dropdown component to pass node id for better context
🔧 (parameterRenderComponent/index.tsx): Update handleOnNewValue prop to accept key parameter for better handling of new values
🔧 (parameterRenderComponent/types.ts): Add nodeId property to BaseInputProps type for better context and consistency

* Don't load the new collection names from db

* Update astradb.py

* Temporary disabling of dialog inputs functionality

* Update directory_reader.py

* Fix problematic uv.lock line

* Update uv.lock

* Update Vector Store RAG.json

* Update Vector Store RAG.json

* refactor: enhance dropdown and refresh button logic for better user experience

- Updated the dropdown component to disable the trigger button when there are no options available or when certain conditions are met.
- Removed the old render options list to streamline the dropdown rendering process.
- Improved the loading state handling in the dropdown to provide clearer feedback to users.
- Refactored the refresh button logic to ensure it only displays when appropriate conditions are met, enhancing the component's responsiveness.

* [autofix.ci] apply automated fixes

* Allow combobox specification of api endpoint

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* Add back api_endpoint option for compatibility

* Update Vector Store RAG.json

* [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>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-01-21 19:43:54 +00:00
xuyingjie
ae7b30c632
fix: artifact repr assignment (#5829)
Co-authored-by: xuyingjie <xuyingjie@unipus.cn>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-01-21 19:42:53 +00:00
anovazzi1
c904d9caf6
chore: Upgrade langflow-embedded-chat to v1.0.7 (#5843)
chore(deps): Upgrade langflow-embedded-chat to v1.0.7

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-21 18:03:45 +00:00
Lucas Oliveira
f08c18f54a
feat: loop components handle ui and logic (#5744)
* Added backend to allow loop on output

* Added custom edge for looping components

* Added allows_loop to output type

* Added output_types to target handle if its a loop

* Fixed valid_connection to allow loops

* Added the loop handle to the outputs

* Added infinity icon

* Fixed clean edges to not delete loop edge

* Implement loop checking before build.

* Implemented looping indicator

* Fixed belzier path

* [autofix.ci] apply automated fixes

* 🔧 (reactflowUtils.ts): refactor cleanEdges and detectBrokenEdges functions to improve code readability and maintainability by extracting repeated logic into variables and reducing code duplication.

* [autofix.ci] apply automated fixes

* Add from_loop_target_handle method to TargetHandle class and update type field

* Enhance Edge class to handle loop target handles and validate loop edges

* Add output_names attribute and get_value_from_output_names method to Vertex class

* Add overlap check for input and output names in Component class

* Fix default value assignment in ComponentVertex to handle output names correctly

* Clarify error message for missing attributes in Component class

* Added backend to allow loop on output

* Added custom edge for looping components

* Added allows_loop to output type

* Added output_types to target handle if its a loop

* Fixed valid_connection to allow loops

* Added the loop handle to the outputs

* Added infinity icon

* Fixed clean edges to not delete loop edge

* Implement loop checking before build.

* Implemented looping indicator

* Fixed belzier path

* [autofix.ci] apply automated fixes

* 🔧 (reactflowUtils.ts): refactor cleanEdges and detectBrokenEdges functions to improve code readability and maintainability by extracting repeated logic into variables and reducing code duplication.

* [autofix.ci] apply automated fixes

* Add from_loop_target_handle method to TargetHandle class and update type field

* Enhance Edge class to handle loop target handles and validate loop edges

* Add output_names attribute and get_value_from_output_names method to Vertex class

* Add overlap check for input and output names in Component class

* Fix default value assignment in ComponentVertex to handle output names correctly

* Clarify error message for missing attributes in Component class

* feat: add loop component 🎁🎄 (#5429)

* add loop component 🎁🎄

* [autofix.ci] apply automated fixes

* fix: add loop component to init

* [autofix.ci] apply automated fixes

* refactor(loop): rename loop input variable and improve code quality

- Renamed 'loop' input to 'loop_input' for clarity.
- Simplified logic for checking loop input and aggregating results.
- Enhanced type hints for better code readability and maintainability.

* refactor(loop): add type hint to initialize_data method for improved clarity

* fix: mypy error incompatible return value type

* feat: adds test cases for loop component compatibility with the APIs, Loop component updates to support API (#5615)

* add loop component 🎁🎄

* [autofix.ci] apply automated fixes

* fix: add loop component to init

* [autofix.ci] apply automated fixes

* refactor(loop): rename loop input variable and improve code quality

- Renamed 'loop' input to 'loop_input' for clarity.
- Simplified logic for checking loop input and aggregating results.
- Enhanced type hints for better code readability and maintainability.

* refactor(loop): add type hint to initialize_data method for improved clarity

* adding test

* test cases added

* Update test_loop.py

* adding test

* test cases added

* Update test_loop.py

* update with the new test case method!

* Update test_loop.py

* tests  updates

* Update loop.py

* update fix

* issues loop issues

* reverting debug mode params

* solves lint errors and fix the tests

* fix: mypy error incompatible return value type

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>

* feat: improve model input fields for Cohere component (#5712)

feat: improve model input fields for cohere component

1. Make api_key field required
2. Convert temperature to SliderInput with range 0-2
3. Add info description to temperature slider

* refactor: improve naming consistency in DataCombiner component (#5471)

* refactor: improve naming consistency in DataCombiner component

- Rename MergeOperation to DataOperation
- Rename component to DataCombinerComponent
- Convert operation enum values to uppercase
- Update method names for consistency

* [autofix.ci] apply automated fixes

* fix: resolved linting errors in __init__.py

* [autofix.ci] apply automated fixes

* Changed operation names to capitalize only first letter

* refactor: rename DataCombinerComponent to MergeDataComponent for better clarity and backwards compatibility

* [autofix.ci] apply automated fixes

* fix: Translate Portuguese text to English in merge_data.py

* feat: add required to data_inputs in MergeDataComponent

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* refactor: Refactor Wikipedia API component (#5432)

* refactor(wikipedia): Refactor Wikipedia API component

* test: add unit tests for WikipediaAPIComponent

* [autofix.ci] apply automated fixes

* refactor: improve WikipediaAPIComponent tests and fix lint issues

* [autofix.ci] apply automated fixes

* fix: resolve lint issues in WikipediaAPIComponent tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: pass slider input values correctly, add test (#5735)

*  (base.py): Update field validation to include "slider" type in addition to "float" type for better parameter handling
📝 (constants.py): Add "slider" type to the list of DIRECT_TYPES for consistency and completeness

*  (test_inputs.py): add unit test for SliderInput class to ensure it initializes with correct value

* 🐛 (base.py): fix comparison of field type with a list by changing it to a set to ensure correct condition evaluation

* [autofix.ci] apply automated fixes

* fix format

* [autofix.ci] apply automated fixes

---------

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

* feat: make AWS credentials required in bedrock component (#5710)

1. Make aws_access_key_id field required
2. Make aws_secret_access_key field required

* chore: update test durations (#5736)

Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>

* feat: add truncation to ResultDataResponse (#5704)

* chore: Update dependencies and improve platform markers in configuration files

- Added 'hypothesis' version 6.123.17 to dev-dependencies in pyproject.toml.
- Updated platform markers from 'sys_platform' to 'platform_system' for better compatibility in uv.lock, affecting multiple packages including 'jinxed', 'colorama', and 'appnope'.
- Ensured consistency in platform checks across various dependencies to enhance cross-platform support.

This update improves the project's dependency management and ensures better compatibility across different operating systems.

* feat: Enhance ResultDataResponse serialization with truncation support

- Introduced a new method `_serialize_and_truncate` to handle serialization and truncation of various data types, including strings, bytes, datetime, Decimal, UUID, and BaseModel instances.
- Updated the `serialize_results` method to utilize the new truncation logic for both individual results and dictionary outputs.
- Enhanced the `serialize_model` method to ensure all relevant fields are serialized and truncated according to the defined maximum text length.

This update improves the handling of large data outputs, ensuring that responses remain concise and manageable.

* fix: Reduce MAX_TEXT_LENGTH in constants.py from 99999 to 20000

This change lowers the maximum text length limit to improve data handling and ensure more manageable output sizes across the application.

* test: Add comprehensive unit tests for ResultDataResponse and VertexBuildResponse

- Introduced a new test suite in `test_api_schemas.py` to validate the serialization and truncation behavior of `ResultDataResponse` and `VertexBuildResponse`.
- Implemented tests for handling long strings, special data types, nested structures, and combined fields, ensuring proper serialization and truncation.
- Enhanced coverage for logging and output handling, verifying that all fields are correctly processed and truncated as per the defined maximum text length.
- Utilized Hypothesis for property-based testing to ensure robustness and reliability of the serialization logic.

This update significantly improves the test coverage for the API response schemas, ensuring better data handling and output management.

* feat: Add function to validate models with tool calling function and related fixes in agent component (#5720)

* Update nvidia.py

* update agent experience with improving model selection

update agent experience with improving model selection  and making only the tool calling models available.

* variable clean up

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/base/models/model_input_constants.py

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

* Update src/backend/base/langflow/base/models/model_input_constants.py

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

* added default models

* [autofix.ci] apply automated fixes

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

* format errors solved

* [autofix.ci] apply automated fixes

* Update model.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* feat: assistants agent improvements (#5581)

* assistants agent improvements

* remove alembic init file

* vector store / file upload support

* use sync file object (required by sdk)

* steps

* self.tools initialization

* improvements for edwin

* add name and switch to MultilineInput

* ci fixes

* refactor: enhance flow type safety and clean up unused code (#5669)

* 📝 (use-save-flow.ts): add AllNodeType and EdgeType imports to improve type safety in useSaveFlow hook
📝 (index.tsx): remove unused setNoticeData function to clean up code and improve readability

* refactor: Remove unused code in GeneralPage component

* refactor: Remove unused code in cardComponent/index.tsx

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>

* feat: Add `required=True` to essential inputs across Langflow components (#5739)

* fix: add required validation to input fields

Ensures mandatory fields are properly marked as required across components.

* fix: add required validation to input fields

Ensures mandatory fields are properly marked as required across components.

* fix: add required validation to input fields

field: model_name

* fix: add required validation to input fields

field: model and base_url

* fix: add required validation to input fields
input: mistral_api_key

* fix: add required validation to input fields

inputs: model, base_url, nvidia_api_key

* fix: add required validation to input fields
inputs: model, base_url

* fix: add required validation to input fields

input: openai_api_key

* fix: add required validation to input fields
inputs: message, embedding_model

* fix: add required validation to input fields
inputs: model_name, credentials

* fix: add required validation to input fields
inputs: aws_secret_access_key, aws_access_key_id

* fix: add required validation to input fields
inputs: input_text, match_text

* fix: add required validation to input fields
inputs: input_message

* fix: add required validation to input fields
inputs: input_value

* fix: add required validation to input fields
input: data_input

* fix: add required validation to input fields
inputs: input_value

* fix: add required validation to input fields
input: data_input

* fix: add required validation to input fields
input: data_input

* fix: add required validation to input fields
input: data_input

* fix: add required validation to input fields
input: data_input

* fix: add required validation to input fields

inputs: data_inputs, embeddings

* fix: add required validation to input fields
inputs: api_key, input_value

* fix: add required validation to input fields
inputs: password, username, openai_api_key, prompt

* fix: add required validation to input fields
inputs: api_key, transcription_result

* fix: add required validation to input fields
inputs: api_key, transcription_result, prompt

* fix: add required validation to input fields
input: prompt

* fix: add required validation to input fields
input: api_key

* fix: add required validation to input fields
inputs: api_key, transcript_id

* fix: add required validation to input fields
inputs: audio_file, api_key

* [autofix.ci] apply automated fixes

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

---------

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

* feat: make YouTube Transcripts URL field required (#5686)

feat: Enhance YouTube Transcripts component by adding required field validation to URL input

This change ensures that users provide a video URL before using the YouTube Transcripts component, preventing potential runtime errors due to missing video source.

* fix: Fix memory leak when creating components (#5733)

Fix memory leak when creating components

* test: Update API key requirements and test configurations for frontend tests (#5752)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>
Co-authored-by: Raphael Valdetaro <79842132+raphaelchristi@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Sebastián Estévez <estevezsebastian@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: VICTOR CORREA GOMES <112295415+Vigtu@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

* Updated loop.py component

* [autofix.ci] apply automated fixes

* update test file

* fix: handle None values in input names and improve type hints

* [autofix.ci] apply automated fixes

* Added loop component test

* Added comments

* test: add 'allow_loop' field to Output dictionary in test_output_to_dict method

* fix: correct key name in Output dictionary from 'allow_loop' to 'allows_loop' in test_output_to_dict method

* Updated frontend loop test

* Updated examples

* 🐛 (generalBugs-shard-9.spec.ts): Fix incorrect test selector for chat memory output element
🐛 (loop-component.spec.ts): Fix incorrect test selector for chat output element
🐛 (generalBugs-shard-3.spec.ts): Fix incorrect test selector for open AI model output element

* [autofix.ci] apply automated fixes

* refactor: update return type in AgentComponent to use dotdict for build_config

This change modifies the return statement in the AgentComponent class to utilize a dotdict for the build_config, enhancing the structure and accessibility of the returned configuration data.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>
Co-authored-by: Raphael Valdetaro <79842132+raphaelchristi@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Sebastián Estévez <estevezsebastian@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: VICTOR CORREA GOMES <112295415+Vigtu@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
2025-01-21 17:52:28 +00:00
Gabriel Luiz Freitas Almeida
86b83b0f64
fix: make sure tests run async (#5842) 2025-01-21 08:16:33 -08:00
Gabriel Luiz Freitas Almeida
a23be65138
refactor: update component test method and Agent component test for be asynchronous (#5841) 2025-01-21 07:56:06 -08:00
Gabriel Luiz Freitas Almeida
050c12df35
fix: add default models to Anthropic and make sure template is updated (#5839)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 07:25:47 -08:00
Cristhian Zanforlin Lousa
64d82d407a
test: Update test selectors in frontend regression tests (#5835) 2025-01-21 07:24:57 -08:00
Phil Nash
c7f6554ea0
fix: allow multipart/form-data boundary to end with a newline (#5660)
The RFC 7578 spec for multipart/form-data requests does not require the
body of a request to end with a CRLF, only that each section begins with
a CRLF. While many clients implement multipart requests with the
trailing CRLF, the implementation for fetch in Node.js version 22 and
below does not.

This caused my a good number of hours debugging!

It does turn out that in September 2024 the Node.js fetch implementation
added the CRLF (https://github.com/nodejs/undici/pull/3625), though this
hasn't made it to a Node.js release yet.

This change allows the boundary to end with a newline or
not, as long as the boundary is followed by the end of the request body.
2025-01-21 01:56:11 +00:00
Vinícios Batista da Silva
349f3441c8
feat: improve model input fields for HuggingFace model component (#5723)
* feat: improve model input fields for huggingface component

1. Make model_id, inference_endpoint and api_token fields required
2. Convert temperature to SliderInput with range 0-2
3. Update temperature info to match HuggingFace's description

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

* feat(huggingface): update model selection and temperature input

This commit enhances the HuggingFace component by implementing a fixed list of
large language models in the dropdown selection and improving the temperature
input with a slider control.

Key changes in src/backend/base/langflow/components/models/huggingface.py:
- Add DEFAULT_MODEL constant set to "meta-llama/Llama-3.3-70B-Instruct"
- Replace model_id StrInput with DropdownInput containing pre-selected models:
  * meta-llama/Llama-3.3-70B-Instruct (default)
  * mistralai/Mixtral-8x7B-Instruct-v0.1
  * mistralai/Mistral-7B-Instruct-v0.3
  * meta-llama/Llama-3.1-8B-Instruct
  * Qwen/Qwen2.5-Coder-32B-Instruct
  * Qwen/QwQ-32B-Preview
  * openai-community/gpt2
  * custom option
- Add real_time_refresh to model_id dropdown for dynamic updates
- Implement custom model input field that shows/hides based on selection
- Replace temperature FloatInput with SliderInput for better UX:
  * Added RangeSpec with min=0, max=2, step=0.01
  * Maintains default value of 0.8
- Add build_config update logic to handle custom model visibility
- Update API URL generation to support custom model IDs
- Import RangeSpec and SliderInput from langflow packages

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

* [autofix.ci] apply automated fixes

* test(huggingface): update tests for enhanced model selection and UI controls

This commit updates the test suite to verify the new features and changes in
the HuggingFace component, ensuring proper functionality of the model selection
dropdown and improved temperature control.

Key changes in src/backend/tests/unit/components/models/test_huggingface.py:
- Update test_huggingface_inputs to verify new DropdownInput for model_id:
  * Check DEFAULT_MODEL as default value
  * Verify presence of 'custom' option
  * Validate required and real_time_refresh settings
- Add verification for custom_model field:
  * Confirm initial custom_model hidden state
  * Verify required flag
- Add specific checks for temperature SliderInput:
  * Validate default value of 0.8
  * Verify RangeSpec configuration (min=0, max=2, step=0.01)
- Improve test structure with detailed assertions for field configurations
- Update imports to include DEFAULT_MODEL constant

Related to previous commit that enhanced the HuggingFace component with
fixed model list and slider controls.

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

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 01:51:10 +00:00
Saurabh Misra
1fdc79b0b2
chore(deps): Upgrade codeflash - fix CI time crash (#5774)
fix codeflash by upgrading it
2025-01-21 01:49:09 +00:00
anovazzi1
dbd2bd9375
fix: update LANGFLOW_COMPONENTS_PATH env variable behavior (#5700)
* Refactor directory_reader.py to simplify file filtering logic

* Refactor flowSidebarComponent to filter out bundles and custom components in CategoryGroup

* [autofix.ci] apply automated fixes

* refactor: Improve file filtering in DirectoryReader

This commit improves the file filtering logic in the DirectoryReader class. Previously, it only excluded files that started with "__" and included all files that were not in a "deactivated" directory. Now, it also considers the depth of the file relative to the safe path. Only files that are one or two levels deep are included in the file list.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-21 01:47:19 +00:00
Ítalo Johnny
f34ba4cd95
fix: preserve template values in custom component updates (#5821)
* fix: preserve template values in custom component updates

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-21 01:28:13 +00:00
Ítalo Johnny
00dcef2bf1
feat: implement function to truncate json (#5811)
* feat: implement function to truncate json

* refactor: apply JSON truncation function in models

* fix: update code to use the standard field serialization format

* Update src/backend/base/langflow/services/database/models/transactions/model.py

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

* Update src/backend/base/langflow/services/database/models/transactions/model.py

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

* Update src/backend/base/langflow/services/database/models/vertex_builds/model.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 21:15:07 +00:00
Cristhian Zanforlin Lousa
44266f593b
feat: update starter projects templates (#5819)
update starter projects templates
2025-01-20 21:10:15 +00:00
Lucas Oliveira
d4b9a3f15b
fix: change border color on chat input when active (#5814)
Fixed border color on chat input
2025-01-20 20:58:25 +00:00
Cristhian Zanforlin Lousa
9dc6c24180
feat: change Text to Message type with backend and frontend support (#5652)
*  (inputs.py): Update default prompt input types to include "MessageTextInput" for improved user experience
📝 (styleUtils.ts): Add color definition for "MessageTextInput" node to enhance visual representation in the frontend

* 📝 (text.py): Update input_types for "Value" to include "Message" for better clarity
📝 (memory.py): Update input_types for "Session ID" to include "Message" for consistency
📝 (message.py): Update input_types for "Session ID" to include "Message" for uniformity
📝 (self_query.py): Update input_types for "Query" to only include "Message" for consistency
📝 (create_data.py): Update input_types for fields to only include "Message" for consistency
📝 (update_data.py): Update input_types for fields to only include "Message" for consistency
📝 (inputs.py): Update DEFAULT_PROMPT_INTUT_TYPES to only include "Message" for consistency
📝 (styleUtils.ts): Remove "MessageTextInput" from nodeColors and nodeColorsName for consistency

* 📝 (model.py): update display name from "Text" to "Message" for better clarity
📝 (url.py): update display name from "Text" to "Message" for better consistency
📝 (memory.py): update display name from "Text" to "Message" for better understanding
📝 (text.py): update display name from "Text" to "Message" for better semantics
📝 (llm_math.py): update display name from "Text" to "Message" for improved readability
📝 (runnable_executor.py): update display name from "Text" to "Message" for better context
📝 (sql_generator.py): update display name from "Text" to "Message" for clearer communication
📝 (text.py): update display name from "Text" to "Message" for better consistency
📝 (parse_data.py): update display name from "Text" to "Message" for enhanced understanding
📝 (wikidata_api.py): update display name from "Text" to "Message" for improved semantics
📝 (test_cycles.py): update display name from "Text" to "Message" for better clarity

* [autofix.ci] apply automated fixes

* 🔧 (App.css): change width property value to fit-content to improve layout responsiveness

* fix: resolve merge conflicts and clean up URLComponent implementation in starter projects

- Removed conflicting sections in the JSON files for 'Custom Component Maker' and 'Graph Vector Store RAG'.
- Ensured the URLComponent class is correctly defined with methods for URL validation and content fetching.
- Updated input and output definitions for better clarity and functionality.

* 🐛 (freeze.spec.ts): fix incorrect test selectors for handle-textinput-shownode and handle-parsedata-shownode elements to match updated element IDs

* 📝 (NodeOutputfield/index.tsx): Add id prop to InspectButton component for better identification
🔧 (freeze-path.spec.ts, freeze.spec.ts, stop-building.spec.ts, decisionFlow.spec.ts, similarity.spec.ts, textInputOutput.spec.ts, generalBugs-shard-5.spec.ts, fileUploadComponent.spec.ts): Update test selectors to match changes in UI components for better test accuracy

*  (duckduckgo.spec.ts): update the test to click on a specific element with the test ID "output-inspection-data-duckduckgosearch" instead of "output-inspection-data" to match the updated frontend implementation.

*  (youtube-transcripts.spec.ts): update selector for clicking on transcript element to match changes in the frontend code, ensuring the test remains accurate

---------

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-01-20 20:36:46 +00:00
Cristhian Zanforlin Lousa
160452673c
feat: update duckduckgo search component version (#5818)
⬆️ (pyproject.toml): upgrade duckduckgo_search dependency from version 6.3.7 to 7.2.1 for bug fixes and new features
♻️ (duck_duck_go_search_run.py): refactor DuckDuckGoSearchComponent by removing unnecessary 'required' attribute from MessageTextInput
2025-01-20 20:06:12 +00:00
Lucas Oliveira
9104770591
fix: removed refresh table when pagination is off (#5813)
Fixed refresh appearing when pagination is off

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 20:05:09 +00:00
Edwin Jose
03c5b31b71
fix: solves agents auto refresh models setting real_time_refresh False (#5810)
* Update model_input_constants.py

* Update anthropic.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-20 19:52:26 +00:00
Cristhian Zanforlin Lousa
d9a52d5cb8
feat: Enhance FlowMenu name editing experience (#5729)
*  (FlowMenu/index.tsx): improve user experience by enhancing the flow name editing functionality in the appHeaderComponent's FlowMenu component

*  (FlowMenu/index.tsx): add data-testid attribute to span element for flow name in MenuBar component
🐛 (edit-flow-name.spec.ts): fix test cases to use correct data-testid value for input element in edit-flow-name feature

*  (store-shard-2.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability
 (edit-flow-name.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability
 (flowSettings.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability
 (general-bugs-move-flow-from-folder.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability

*  (FlowMenu/index.tsx): add useEffect hook to set flow name when currentFlow is present and not editing name

* fix errors

*  (youtube-transcripts.spec.ts): update timeout values for page.waitForSelector to improve test performance and reliability

*  (sliderComponent): Add cn utility function to improve classnames handling in SliderComponent
📝 (floatComponent.spec.ts): Update test descriptions and values for NVIDIA related components
♻️ (sliderComponent.spec.ts): Refactor code to replace FloatInput with SliderInput and update import statements and values for temperature slider

*  (youtube-transcripts.spec.ts): skip the test for youtube transcripts component to prevent it from running during test suite execution
2025-01-20 19:41:49 +00:00
Raphael Valdetaro
94d192ff5d
feat: Introduced YouTube bundle with essential components (#5415)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-01-20 10:49:54 -08:00
anovazzi1
bde5fea4af
refactor: Remove "commands" field from TOOL_TABLE_SCHEMA (#5809) 2025-01-20 17:23:27 +00:00
Edwin Jose
bbb3987cda
feat: Add model filtering support for Ollama Component, improving stability (#5748)
* Update ollama.py

* ollama models refactor

* ollama embeddings support for model filters

* formatting

* Update src/backend/base/langflow/components/embeddings/ollama.py

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

* [autofix.ci] apply automated fixes

* fix test

* reverting test

* refactor: Update Ollama components to use async URL validation

- Changed `is_valid_ollama_url` method to be asynchronous in both `ollama.py` files.
- Updated calls to `is_valid_ollama_url` to use `await` for proper async handling.
- Modified URL validation logic to ensure compatibility with async operations.
- Improved overall responsiveness of the Ollama components by leveraging async HTTP requests.

* reverting to empty list!

---------

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-01-20 17:00:40 +00:00
Gabriel Luiz Freitas Almeida
3b8578ca8c
feat: Add MAX_ITEMS_LENGTH constant and implement list truncation in ResultDataResponse (#5807)
* feat: add MAX_ITEMS_LENGTH constant and implement list truncation in ResultDataResponse

- Introduced a new constant MAX_ITEMS_LENGTH set to 1000 in constants.py.
- Updated ResultDataResponse in schemas.py to truncate lists exceeding MAX_ITEMS_LENGTH, appending a message indicating the number of truncated items.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-20 16:53:11 +00:00
Gabriel Luiz Freitas Almeida
25ca57f53f
tests: Remove unnecessary benchmark markers from server init tests (#5806)
refactor(tests): remove benchmark markers from server init tests

- Removed unnecessary @pytest.mark.benchmark decorators from multiple performance test functions in test_server_init.py.
- This change streamlines the test suite by eliminating redundant benchmarking annotations, while maintaining the integrity of the tests.
2025-01-20 16:43:46 +00:00