Commit graph

15,026 commits

Author SHA1 Message Date
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
VICTOR CORREA GOMES
420cd92faa
feat(component): API Request Component Overhaul (#5007)
* 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>
2025-01-20 16:23:59 +00:00
anovazzi1
0cf4f03400
fix: Improve error handling in aupdate_messages function to prevent empty message error (#5655)
* 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>
2025-01-20 16:21:19 +00:00
Cristhian Zanforlin Lousa
00deb49c67
fix: Add optional chaining for getSelectedRows in TableComponent (#5805)
🐛 (tableComponent/index.tsx): fix potential null pointer exception when getting selected rows length
2025-01-20 16:14:45 +00:00
github-actions[bot]
b0325ef2af
chore: update test durations (#5799)
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 15:54:25 +00:00
Raphael Valdetaro
a9559515e5
refactor: Search API component ensuring standard output pattern (#5435)
* refactor: Update Search API component to standard output pattern

* fix: rename component class to avoid conflict with legacy version

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix: address performance regression

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-01-20 15:43:22 +00:00
Owein
2dffc5dfd3
feat: add more search parameters to google_serper_api component (#4944)
* feat: add more search parameters to google_serper_api component

* [autofix.ci] apply automated fixes

* fix: change default value of query_params to None in GoogleSerperAPIComponent

* [autofix.ci] apply automated fixes

* fix: update query_params type to Optional

* [autofix.ci] apply automated fixes

* fix: move QuerySchema definition outside the Component

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/tools/google_serper_api.py

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

* fix: format code for better readability in google_serper_api.py

* [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>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 15:38:56 +00:00
Raphael Valdetaro
06139ef2df
refactor(yahoo-finance): Refactor Yahoo Finance API component to support tool mode (#5434)
* refactor(yahoo-finance): Refactor Yahoo Finance API component

* fix(yahoo-finance): Revert method input changes and fix enum error

* fix: update yfinance tool test and remove duplicate method

* fix: rename component class to avoid conflict with legacy version

* [autofix.ci] apply automated fixes

* test: add ToolException import to yfinance tool tests

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-01-20 15:07:37 +00:00
Gabriel Luiz Freitas Almeida
18e21cfec9
fix: make chat input sorting logic exclude other components (#5760)
* 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>
2025-01-20 13:49:44 +00:00
Anwar Sadat Ayub
feb6907909
docs: corrected typo flowis to flow is (#5695)
fix: correct typo "flowis" to "flow is"

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 13:34:01 +00:00
Cristhian Zanforlin Lousa
5c3c680c41
refactor: Enhance InputList Component UI/UX (#5726)
* [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>
2025-01-20 13:25:55 +00:00
Sujal Bhavsar
317c743906
feat(groq): added llama 3.3 models (#5497)
* Update groq_constants.py

added new llama 3.3 models from groq

* Rechecking the codeflash workflow

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 13:01:19 +00:00
Vini murafa
1afa76a75c
fix: fix typo in CONTRIBUTING.md (#5556)
Fix typo Update CONTRIBUTING.md

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 12:59:56 +00:00
Gabriel Luiz Freitas Almeida
204b4e10e0
refactor: add utility methods for getting display name and improve error messages (#5653)
* 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>
2025-01-20 12:53:31 +00:00
Jason
84c6ed2217
feat: add new model provider Novita AI (#5380)
* 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>
2025-01-20 12:53:28 +00:00
dhlidongming
6b02ef0a70
fix: initial hidden state for shadow-box component (#5639)
* Ensure shadow-box starts hidden on initial render.

* add comment to explain not obvious style fix

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 12:52:30 +00:00
Hack666r
e00ee88e06
fix: fix typo Update DEVELOPMENT.md (#5558)
Fix typo Update DEVELOPMENT.md

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 12:43:29 +00:00
github-actions[bot]
a800778f70
chore: update test durations (#5790)
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 12:33:45 +00:00
anovazzi1
8b7cbba206
fix: Adjust size of LMStudioIcon component (#5763)
refactor: Adjust size of LMStudioIcon component

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 12:31:39 +00:00
Cristhian Zanforlin Lousa
4d8e050f40
feat: Add output dimensionality validation for Google AI embeddings (#5758)
* 🐛 (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>
2025-01-20 12:22:35 +00:00
Edwin Jose
d9d9cbb345
fix: tool name in component toolkit if the name of the component is None (#5761)
* Update component_tool.py

* formatting

* Update src/backend/base/langflow/base/tools/component_tool.py

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

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 12:07:33 +00:00
Gabriel Luiz Freitas Almeida
45f2bebc31
fix: change telemetry logging level from exception to error (#5804)
fix: change telemetry logging from exception to error level
2025-01-20 12:00:16 +00:00
Nguyễn Hưng
bf57f058c7
fix: correct issue with change api key to be of type str (#5716)
* 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>
2025-01-20 11:57:47 +00:00
VICTOR CORREA GOMES
6c79a3d6aa
refactor(tools): overhaul Python REPL component with modern tool mode (#5463)
* refactor(tools): overhaul Python REPL component with modern tool mode

BREAKING CHANGE: Complete redesign of PythonREPL component architecture

- Replace legacy tool mode with modern tool_mode=true implementation
- Add automatic import detection for both global and from-imports
- Remove manual global_imports field in favor of automatic detection
- Implement CodeInput type support with FieldTypes.CODE
- Update schema to handle new parameters for agent compatibility
- Improve error handling and logging for import failures

The component now automatically handles imports without manual configuration,
supports modern tool mode, and provides better integration with the agent
system through updated schema definitions.

* refactor(python-repl): remove name parameter

* feat(security): add required global imports validation

- Add explicit global imports input for security control
- Set both global_imports and python_code as required fields
- Remove AST-based import analysis in favor of explicit imports

* [autofix.ci] apply automated fixes

* fix: remove generic exception handling in python_repl

Removed overly broad exception handling to comply with linting rules.

* fix

* test(python-repl): update component test to match current implementation

- Remove assertions for deprecated outputs (api_run_model, api_build_tool)
- Add assertions for current 'results' output
- Add detailed input validation tests for global_imports and python_code
- Verify input configurations including type, default values, and required status
- Ensure component template structure matches frontend requirements

This change aligns the test suite with the current PythonREPLToolComponent
implementation, improving test coverage and maintaining component reliability.

* revert(tools): restore Python REPL component to original implementation

Due to backward compatibility concerns, reverting the Python REPL component
to its initial implementation state to maintain stability and prevent breaking changes.

* feat(tools): mark Python REPL component as deprecated & Legacy

* feat(tools): add Python REPL Core component

* [autofix.ci] apply automated fixes

* fix(tests): mark Python REPL Core as unreleased component

* fix(__init__): fix

* feat(python-repl): improve example clarity for printing the results

* fix(tests): resolve KeyError in test_component_versions

* style(python-repl): format description string to follow PEP 8 guidelines

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-01-20 11:54:32 +00:00
Gabriel Luiz Freitas Almeida
918159f3ce
fix: update datetime serialization to include timezone information (#5795)
* fix: update datetime serialization to include timezone information

* fix: improve datetime serialization to use 'utc_date' for clarity
2025-01-20 11:51:49 +00:00
Ítalo Johnny
c8eb408b5e
feat: preserve manual component data if code unchanged (#5482)
* chore: preserve manual component data if code unchanged

* Fixed tool mode switch not changing with code

* Removed console.log

* Made tool mode not be lost when mutating template

* use setNode instead of setNodes on component code

* refactor: tool_mode return

* Fix tool mode being reverted on toggle

* fix: tool_mode outputs return

* change: logic for setting `tool_mode`

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 11:34:52 +00:00
Phil Nash
c1cec32d9e
feat: use all available time zone names in CurrentDateComponent (#5797)
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-01-20 07:46:30 +00:00
Raphael Valdetaro
7f6b924f9c
refactor: Update Serp API component to standard output pattern (#5437)
* refactor: Update Serp API component to standard output pattern

* test: add unit tests for SerpAPIComponent

* [autofix.ci] apply automated fixes

* fix: rename component class to avoid conflict with legacy version

* [autofix.ci] apply automated fixes

* fix: update SerpAPI to extend LCToolComponent

* [autofix.ci] apply automated fixes

* deprecate: mark SerpAPIComponent as legacy and deprecated

* refactor: update Serp API component tests to use new SerpComponent

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-01-20 07:17:43 +00:00
Cristhian Zanforlin Lousa
6ac45a8638
feat: enhance environment variable support and update settings configuration (#5766)
*  (langflow/__main__.py): Add logic to dynamically update auth settings based on environment variables prefixed with "LANGFLOW_"
♻️ (auth.py): Refactor AuthSettings class to use model_config attribute for configuration settings instead of Config class

*  (langflow/__main__.py): dynamically load environment variables prefixed with "LANGFLOW_" into settings_service.settings for improved configuration flexibility

* [autofix.ci] apply automated fixes

* formatting code

* [autofix.ci] apply automated fixes

* ♻️ (langflow/__main__.py): refactor code to remove redundant loop that sets settings from environment variables

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-01-20 06:03:29 +00:00