* 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>
* 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>
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.
* 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>
* 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>
* 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>
* ✨ (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>
⬆️ (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
* ✨ (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
* 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>
* 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>
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.
* style: Add icon property to WebhookComponent class
* style: Update input components in APIRequest class
* fix pr
* [autofix.ci] apply automated fixes
* remove debug print statement from api_request component
* remove debug print statement from api_request component
* feat: add dynamic cURL mode to APIRequestComponent
- Add cURL command parsing and field population
- Implement dynamic UI updates based on cURL input
- Support JSON body and headers extraction from cURL
- Add real-time refresh for cURL mode toggle
* refactor(APIRequestComponent): improve HTTP methods and cURL handling
- Add DELETE method support
- Enhance cURL parameter handling and UI visibility
- Fix JSON decode error handling with specific exception
- Update method visibility for DELETE requests
* style: Update input components in APIRequest class
* [autofix.ci] apply automated fixes
* remove debug print statement from api_request component
* remove debug print statement from api_request component
* feat: add dynamic cURL mode to APIRequestComponent
- Add cURL command parsing and field population
- Implement dynamic UI updates based on cURL input
- Support JSON body and headers extraction from cURL
- Add real-time refresh for cURL mode toggle
* refactor(APIRequestComponent): improve HTTP methods and cURL handling
- Add DELETE method support
- Enhance cURL parameter handling and UI visibility
- Fix JSON decode error handling with specific exception
- Update method visibility for DELETE requests
* [autofix.ci] apply automated fixes
* git commit -m "ui(api-request): adjust field visibility and requirements
- Move query_params to advanced section
- Make URL field required"
* feat(api): enhance curl parsing and update unit tests
- Improve MultilineInput handling in APIRequestComponent for curl commands
- Update parse_curl unit test to match expected data structure
- Ensure consistent format for headers and body in test assertions
* [autofix.ci] apply automated fixes
* fix(api-request): improve UI/UX and fix initial field visibility
- Fix body field flickering on component load
- Enhance URL/cURL field toggle behavior
* ✅ (filterSidebar.spec.ts): add tests for clicking on edit button modal, show headers button, and closing the modal to ensure correct behavior and visibility of elements
* 📝 (dictComponent/index.tsx): update data-testid attribute to dynamically set based on editNode value for better testability
📝 (nestedComponent.spec.ts): update test data and selectors to match changes in dictComponent/index.tsx for accurate testing
* refactor(api_request): improve component UX and field handling
- Update tool_mode placement to align with main branch changes
- Remove temporary required field validation to prevent UI conflicts
- Add field clearing logic when switching between cURL and URL modes
- Update component description to be more concise
* git commit -m "fix: resolve merge conflicts with upstream in api request component
* fix: resolve merge conflicts with upstream in api request component
* Delete src/backend/tests/unit/test_data_components.py
BREAKING CHANGE: Removed test_data_components.py as it has been replaced by test_api_request_component.py
* git commit -m "test(api-request): update test_parse_curl to match TableInput format
* style(test_api-request): apply ruff formatting rules
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* refactor: Improve error handling in aupdate_messages function
* Update src/backend/base/langflow/memory.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* fix(tests): updating a non-existing message adds a new message now
- Updated the test name from `test_aupdate_nonexistent_message` to `test_aupdate_nonexistent_message_generates_a_new_message` for better clarity.
- Modified the assertion to expect that a new message is generated when attempting to update a nonexistent message, changing the expected length of the updated messages from 0 to 1.
* [autofix.ci] apply automated fixes
* fix(tests): update message handling in tests for non-existent messages
- Refactored tests to ensure that attempting to update a non-existent message raises a ValueError instead of creating a new message.
- Updated test names and assertions for clarity and accuracy, ensuring they reflect the expected behavior when handling messages that do not exist in the database.
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix: Adjust chat input handling in layer sorting logic
* fix: Update chat input sorting logic and assertions in tests
* [autofix.ci] apply automated fixes
* fix: Update test assertion for chat input sorting to reflect changes in expected output
* [autofix.ci] apply automated fixes
* fix: update vertex sorting logic to handle start_component_id condition
- Modified the condition for sorting layers to include a check for start_component_id being None, ensuring correct behavior when this parameter is not set.
- This change improves the accuracy of the vertex sorting process in the graph utility functions.
* fix: update test assertion for vertex IDs in test_get_vertices
- Modified the test assertion in `test_get_vertices` to reflect the expected output, ensuring it only checks for "ChatInput" in the returned IDs.
- This change improves the accuracy of the test by aligning it with the current expected behavior of the endpoint.
* [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>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
* [LFOSS-74]: input list UI improvements
* ✨ (frontend): Add new component 'DeleteButtonInputList' to improve user experience by providing a button to delete items in a list
📝 (frontend): Comment out unused code related to duplicating input items for now, to be revisited in a future release
📝 (frontend): Add a comment to indicate that the 'DropdownMenuInputList' feature will be added back in a future release
📝 (frontend): Update CSS styling for 'hit-area-icon' class to adjust size to h-7 and w-7 for consistency
📝 (frontend): Adjust color values in CSS to improve visual appearance, changing smooth-red to a new shade
* ✨ (keypairListComponent/index.tsx): simplify conditional styling logic for list items to improve readability and maintainability
* 📝 (delete-button-input-list.tsx): Remove unused imports and update function parameter type for removeInput to specify React.MouseEvent
📝 (delete-button-input-list.tsx): Update button className and IconComponent className for better styling and readability
📝 (delete-button-input-list.tsx): Update ICON_STROKE_WIDTH constant value from 1.25 to 1.5 for better icon appearance
📝 (index.tsx): Update InputListComponent to render DeleteButtonInputList component conditionally based on value length
📝 (constants.ts): Update ICON_STROKE_WIDTH constant value from 1.25 to 1.5 for better icon appearance
📝 (inputListComponent.spec.ts): Update test cases to use updated test IDs for delete buttons and adjust expected input values to match changes in component behavior
* [autofix.ci] apply automated fixes
* 🔧 (applies.css): adjust positioning of input-slider-text to fix alignment issue and improve user experience
* 🐛 (button-input-list.tsx): fix button position by adjusting translate-x value to align properly on the page
* ✨ (index.tsx): add visual indicator for focused input element in the list to improve user experience
---------
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: add methods to access inputs' and outputs' display_name
- Updated error messages to use display names for inputs and outputs, improving clarity.
- Introduced utility methods for building consistent error messages related to inputs, outputs, and components.
- Added public methods to retrieve user-friendly display names for inputs and outputs.
- Refactored existing error handling to utilize the new messaging methods for better maintainability.
* refactor: enhance error message formatting for inputs, outputs, and components
- Updated error message formatting to place input, output, and component names at the beginning for better visibility, especially when messages are truncated.
- Changed the format of error messages to use square brackets for consistency and improved readability.
- Ensured that utility methods for building error messages maintain a user-friendly approach.
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: add new model provider Novita AI
* [autofix.ci] apply automated fixes
* fix: code format fix
* fix: code format fix
* fix: fix default Novita AI models
* [autofix.ci] apply automated fixes
* feat: Add real-time refresh for Novita API key and include it in VARIABLES_TO_GET_FROM_ENVIRONMENT
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 🐛 (google_generative_ai.py): add input validation to ensure output dimensionality is within valid range
* [autofix.ci] apply automated fixes
* 🐛 (google_generative_ai.py): refactor code to use constants for min and max output dimensionality values to improve readability and maintainability
* [autofix.ci] apply automated fixes
* 📝 (google_generative_ai.py): remove unnecessary error message detail about received dimensionality, as it is not relevant for users and does not affect functionality
* [autofix.ci] apply automated fixes
* 🐛 (google_generative_ai.py): enhance output dimensionality validation by ensuring checks only occur when output_dimensionality is not None
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* change api key to be of type str
* change SecretStr type to new way import
* revert package-lock changes
- Removed license information from several dependencies in package-lock.json for cleaner output.
- Updated versions of various dependencies, including @babel packages and chakra-ui components, to their latest compatible versions.
- Ensured consistency in dependency versions across the project to maintain stability and compatibility.
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>