Commit graph

6,323 commits

Author SHA1 Message Date
wjwjtf
2c0133d324
fix: Rename AgentQL components and add prompt parameter (#6834)
* renamed components

* add prompt parameter

* [autofix.ci] apply automated fixes

* prevent both query and prompt

* ruff checks

* [autofix.ci] apply automated fixes

* amend conditional check

* change error message

* update templates

* [autofix.ci] apply automated fixes

* fix tags

* fix tags in news aggregator

---------

Co-authored-by: huwenjie912 <huwenjie912@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>
2025-03-13 06:36:18 +00:00
Rodrigo Nader
174468a281
feat: add a unified language model component. (#6994)
* add a unified language model component with a few providers

* [autofix.ci] apply automated fixes

* fix errors and add 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-03-13 05:03:55 +00:00
Christophe Bornet
62884f6c8b
feat: Sync flows from FS to DB if flow has fs_path (#7043)
* feat: Sync flows from FS to DB if flow has fs_path

* Changes following review

* Simplify flow_mtimes handling

* Move sync_flows_from_fs to setup.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-03-13 00:41:31 +00:00
Gabriel Luiz Freitas Almeida
979c4a6d70
test: Parameterize DeepSeek model component test correctly (#7019)
test: Parameterize DeepSeek model component test with temperature and max tokens
2025-03-13 00:25:32 +00:00
github-actions[bot]
af36d9c386
chore: update test durations (#6975)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2025-03-12 21:31:27 -03:00
Pedro Pacheco
eedef1efae
Feat: add a support for OpenSearch and AstraDB components to yield the langchain vector_store connection object (#6998)
* Added decorator, decorator test, and modified supported vector stores

* Renamed module file name to reflect that this is for generic use, not use for graph rag

* Updated docsstring

* Improved documentation and modification to UT to support graph rag

* Remove extra file from PR

* rollback vector store template

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-12 00:41:34 +00:00
Edwin Jose
5a13f32da5
feat: add tool filter (#6951)
* updates to tool mode

* fix the update real time table refresh issues.

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Update component.py

* Update component.py

* format errors

* [autofix.ci] apply automated fixes

* Update index.tsx

* [autofix.ci] apply automated fixes

* lint error fix

* [autofix.ci] apply automated fixes

* fix format issue

* [autofix.ci] apply automated fixes

* fix typing.override does not exist in your Python version

* filter added

* Update index.tsx

* [autofix.ci] apply automated fixes

* update variables

* modify tool filter

* added dynamic property to set the tools in a better effective way

* filter with property

* lint fix

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-11 16:19:10 +00:00
Gabriel Luiz Freitas Almeida
d77686d9d2
refactor: improve maintainability and testability of Vertex.build_params (#5808)
* refactor: Simplify parameter building in Vertex class using ParameterHandler

* feat: Add unit tests for ParameterHandler class and organize test structure

* refactor: rename openai.py to openai_chat_model.py to avoid overlapping names

- Introduced a new OpenAIModelComponent class to facilitate text generation using OpenAI's language models.
- Implemented various input fields including max_tokens, model_kwargs, json_mode, model_name, openai_api_base, api_key, temperature, and seed for enhanced configurability.
- Added methods for building the model and handling exceptions from OpenAI API calls.
- This component enhances the existing framework by integrating OpenAI's capabilities, allowing users to generate text with customizable parameters.

* refactor: update OpenAIModelComponent import paths to use openai_chat_model

- Changed import statements in model_input_constants.py, __init__.py, and test_tool_calling_agent.py to reflect the new OpenAIModelComponent location.
- This refactor improves code organization and clarity by ensuring consistent usage of the updated component structure.

* fix(param_handler): add error handling for invalid field types

- Introduced a ValueError exception for invalid field types in the ParameterHandler class.
- This change enhances robustness by ensuring that only valid field types are processed, improving error reporting for developers.

* feat: Support list-based file path handling in ParameterHandler

* test: Add comprehensive tests for ParameterHandler field processing

* feat: Enhance field skipping logic in ParameterHandler

Add support for skipping fields with type "other" in the parameter handling process

* refactor: Simplify storage service initialization and edge parameter processing

* refactor: Modernize parameter handling with pattern matching

Improve type handling and conversion in ParameterHandler by:
- Replacing conditional logic with pattern matching
- Simplifying type conversion for various field types
- Reducing nested conditionals
- Enhancing code readability and maintainability

* refactor: Update type hints for CycleEdge in parameter handling

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-03-11 15:34:15 +00:00
Christophe Bornet
581e8cb643
feat: Add possibility to save flow to FS (#6841)
Add possibility to save flow to FS
2025-03-11 14:03:37 +00:00
Gabriel Luiz Freitas Almeida
c720933001
fix: Update LoopComponent to use data instead of item (#7013)
* fix: update loop component to use `data` instead of `item`

* [autofix.ci] apply automated fixes

*  (loop-component.spec.ts): update test to expect two occurrences of "modified_value" in the output instead of one

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-03-11 14:01:24 +00:00
Ítalo Johnny
f748ea9bc8
refactor: remove async queue from tracing service (#6999) 2025-03-11 10:15:31 +00:00
Ítalo Johnny
cb61dded91
fix: ensure end_all_traces is called at the end of all flow build events (#6991) 2025-03-10 21:04:39 +00:00
Edwin Jose
a8f4090888
feat: improving tool mode metadata updates and tables refresh (#6935)
* updates to tool mode

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* fix the update real time table refresh issues.

* [autofix.ci] apply automated fixes

* Update component.py

* Update component.py

* format errors

* [autofix.ci] apply automated fixes

* Update index.tsx

* [autofix.ci] apply automated fixes

* lint error fix

* [autofix.ci] apply automated fixes

* fix format issue

* [autofix.ci] apply automated fixes

* fix typing.override does not exist in your Python version

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-10 14:45:35 +00:00
Cristhian Zanforlin Lousa
94140ccf2e
feat: Enhance Webhook component (#6313)
* 📝 (constants.py): Add "copy_field" attribute to FIELD_FORMAT_ATTRIBUTES list
📝 (webhook.py): Add "copy_field" attribute to MultilineInput component
📝 (input_mixin.py): Add "copy_field" attribute to BaseInputMixin class
📝 (inputs.py): Add "copy_field" attribute to StrInput class
📝 (template/field/base.py): Add "copy_field" attribute to Input class
🚀 (NodeDescription/index.tsx): Remove default placeholder text for emptyPlaceholder prop
 (copyFieldAreaComponent/index.tsx): Add new component for handling copy field functionality
♻️ (strRenderComponent/index.tsx): Refactor component to include CopyFieldAreaComponent when copy_field attribute is present in template data

*  (NodeDescription/index.tsx): refactor renderedDescription useMemo to improve readability and maintainability
♻️ (GenericNode/index.tsx): refactor code to improve readability and maintainability, and optimize rendering logic

* 📝 (webhook.py): Add cURL field to WebhookComponent for better integration with external systems
📝 (graph/base.py): Add logging of vertex build information in Graph class for debugging purposes
📝 (NodeInputField/index.tsx): Add nodeInformationMetadata to NodeInputField for better tracking of node information
📝 (copyFieldAreaComponent/index.tsx): Refactor CopyFieldAreaComponent to handle different types of values, including webhooks
📝 (strRenderComponent/index.tsx): Add WebhookFieldComponent to handle webhook type in StrRenderComponent
📝 (tableNodeCellRender/index.tsx): Add nodeInformationMetadata to TableNodeCellRender for better tracking of node information
📝 (textAreaComponent/index.tsx): Add support for webhook format in TextAreaComponent for better integration with webhooks
📝 (webhookFieldComponent/index.tsx): Add WebhookFieldComponent to handle webhook type in ParameterRenderComponent
📝 (custom-parameter.tsx): Add nodeInformationMetadata to CustomParameterComponent for better tracking of node information
📝 (get-curl-code.tsx): Add support for different formats in getCurlWebhookCode for generating cURL commands
📝 (textAreaModal/index.tsx): Add onCloseModal callback to ComponentTextModal for better handling of modal closing
📝 (index.ts): Add type field to APIClassType for better typing of API classes

*  (index.tsx): Add a button to generate a token in the WebhookFieldComponent for improved user experience and functionality. Update the structure of the component to include the new button and styling adjustments.

* [autofix.ci] apply automated fixes

*  (generate-token-dialog.tsx): add GenerateTokenDialog component to handle token generation in webhookFieldComponent
📝 (index.tsx): import and use GenerateTokenDialog component in WebhookFieldComponent for token generation functionality

*  (frontend): introduce new feature to create API keys with customizable modal properties
🔧 (frontend): add modalProps object to customize modal title, description, input label, input placeholder, button text, generated key message, and show icon flag

* add pool interval variable and tests

* 📝 (NodeOutputfield): Remove unused ScanEyeIcon component
 (validate-webhook.ts): Add function to validate webhook data before processing
♻️ (use-get-builds-pooling-mutation): Refactor to set flow pool based on current flow
🔧 (content-render.tsx): Add data-testid attribute to api key input element
🔧 (webhookComponent.spec.ts): Refactor test to use waitForRequest for monitoring build requests

* [autofix.ci] apply automated fixes

* 🔧 (backend): rename webhook_pooling_interval to webhook_polling_interval for consistency
🔧 (frontend): update references to webhook_pooling_interval to webhook_polling_interval for consistency

* 📝 (frontend): Update import paths and remove unused imports for better code organization and maintainability
🔧 (frontend): Refactor background styles in components to use constants for consistency and easier theming
🚀 (frontend): Add custom SecretKeyModalButton component for better modularity and reusability

* 📝 (use-get-api-keys.ts): add a TODO comment to request API key from DSLF endpoint for future implementation.

* 📝 (input_mixin.py): Remove copy_field attribute from BaseInputMixin as it is no longer needed
♻️ (inputs.py): Remove copy_field attribute from StrInput class as it is no longer needed
♻️ (inputs.py): Set copy_field attribute to False in MultilineInput class to ensure consistency
♻️ (template/field/base.py): Remove copy_field attribute from Input class as it is no longer needed
📝 (textAreaComponent/index.tsx): Replace hardcoded value "CURL_WEBHOOK" with constant WEBHOOK_VALUE for better readability and maintainability

* 🐛 (base.py): fix issue where flow_id could be None by defaulting to an empty string if flow_id is None

* 🔧 (secret-key-modal.tsx): Remove unused SecretKeyModalButton component
🔧 (get-modal-props.tsx): Remove unused getModalPropsApiKey function and related imports and constants

* 📝 (langflow): add noqa comments to suppress linting rule A005 for specific files in the io, logging, and socket modules

* [autofix.ci] apply automated fixes

* 📝 (frontend): Remove unused endpointName property from NodeInputField component
🔧 (frontend): Add useFlowStore import and use it to get currentFlow and endpointName in CopyFieldAreaComponent, TableNodeCellRender, TextAreaComponent, and WebhookFieldComponent components
🔧 (frontend): Refactor useGetBuildsMutation to handle multiple concurrent requests and prevent duplicate requests

*  (webhookComponent.spec.ts): refactor test to improve readability and maintainability by removing redundant code and focusing on essential test steps
♻️ (userSettings.spec.ts): refactor test to improve readability and maintainability by removing redundant code and focusing on essential test steps

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-10 13:10:55 +00:00
Cristhian Zanforlin Lousa
47753d37d3
feat: Add JSON field extraction and enhanced URL validation (#6051)
* URL component improvement - JSON URL

* [autofix.ci] apply automated fixes

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

* ♻️ (url.py): refactor URLComponent class to simplify data_dict creation by using dictionary unpacking instead of manual key-value pairs

* [autofix.ci] apply automated fixes

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

* 📝 (url.py): improve formatting of info string for DropdownInput in URLComponent class
♻️ (url.py): refactor ensure_url method to simplify logic and improve readability
🐛 (url.py): fix error handling in URLComponent class for invalid JSON content

* [autofix.ci] apply automated fixes

*  (url.py): Add BoolInput and StrInput to support new features in URLComponent
📝 (url.py): Update description in URLComponent to provide more detailed information about its functionality
♻️ (url.py): Refactor update_build_config method in URLComponent to dynamically update fields based on selected format
🐛 (url.py): Fix ensure_url method in URLComponent to ensure valid URLs are provided and handle exceptions properly
🐛 (url.py): Fix fetch_content method in URLComponent to handle cases where no valid URLs are provided and improve error handling
🐛 (url.py): Fix fetch_content_text method in URLComponent to correctly format and clean text output based on selected format and settings
🐛 (url.py): Fix as_dataframe method in URLComponent to return fetched content as a DataFrame object

* [autofix.ci] apply automated fixes

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

* ♻️ (url.py): remove unnecessary comments and improve code readability by removing redundant comments and adjusting code structure.

* [autofix.ci] apply automated fixes

* 📝 (url.py): improve readability by splitting long description and info strings into multiple lines
🐛 (url.py): handle cases where invalid URLs or JSON URLs are provided, and provide informative error messages
🐛 (url.py): handle cases where no valid URLs are provided and raise an error with a clear message

* 🔧 (Blog Writer.json, Custom Component Maker.json, Graph Vector Store RAG.json): resolve merge conflicts in JSON files related to the 'format' field options to ensure consistency across starter projects.

* [autofix.ci] apply automated fixes

* 🐛 (url.py): fix validation of JSON content from URLs to ensure correct handling of JSON data
 (url.py): introduce async validation of JSON content from URLs using aiohttp to improve performance and reliability

* [autofix.ci] apply automated fixes

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

* merge fix

*  (test_audio_file.wav): update test_audio_file.wav to fix binary file differences in the test asset

* 🐛 (test_url_component.py): update error message format to improve clarity and consistency

* update templates

* 🐛 (test_database.py): fix error handling in test_read_flows_components_only_paginated to properly catch and log exceptions during test execution

* 📝 (backend): Add noqa comments to files to ignore specific linting rule A005
🔧 (test_database.py): Remove duplicate import statement for sqlalchemy
♻️ (test_database.py): Refactor test_read_flows_components_only_paginated function for better readability and maintainability

* 🐛 (test_database.py): fix test_read_flows_components_only_paginated to handle exceptions and provide more context in case of failure

* 📝 (test_database.py): remove unnecessary comment to improve code readability and maintainability

* 📝 (backend): Remove unnecessary noqa comments from __init__.py files
🔧 (test_database.py): Refactor test_read_flows_components_only_paginated function for better readability and maintainability

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-10 12:28:51 +00:00
Edwin Jose
a5a8227833
feat: add GPT4.5 to OpenAI model constants (#6886)
* updates to models

* [autofix.ci] apply automated fixes

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

* update to templates

* Update openai_constants.py

* [autofix.ci] apply automated fixes

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

* updated the list order

* [autofix.ci] apply automated fixes

* update to default model

* refactor: Update OpenAI model names list

* [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-03-06 12:44:26 +00:00
Kevin Turcios
c775373614
chore: make codeflash config ignore-paths relative in langflow-base (#6938)
make ignore-paths relative
2025-03-06 12:30:31 +00:00
Jordan Frazier
72a8573b2f
fix: set prepared threshold to none for migrations (#6912)
* Set prepared threshold to none for migrations

* [autofix.ci] apply automated fixes

* ruff

* revert search

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-05 19:56:14 +00:00
Jordan Frazier
faac4db133
fix: auth current user on code validation (#6911)
* Add user auth for /code endpoint

* import

* revert

* [autofix.ci] apply automated fixes

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

* ruff

* fix tests

* [autofix.ci] apply automated fixes

* ruff

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
2025-03-05 17:04:03 +00:00
Eric Hare
e1ee081d32
feat: Add more icons and QOL improvements to Astra DB component (#6918)
* Test commit

* QoL updates for Astra DB component

* [autofix.ci] apply automated fixes

* Update astradb.py

* [autofix.ci] apply automated fixes

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

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Keep ordering proper in Vector RAG template

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-05 16:58:25 +00:00
Gabriel Luiz Freitas Almeida
389325b67b
refactor: use DataFrame.map instead of DataFrame.applymap (#6810)
* refactor: replace deprecated `DataFrame.applymap` with `DataFrame.map`

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-03-05 16:47:26 +00:00
wjwjtf
105bd59e88
fix: Send request origin in AgentQL request Headers (#6833)
* add request origin for agentql and update template

* [autofix.ci] apply automated fixes

---------

Co-authored-by: huwenjie912 <huwenjie912@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>
2025-03-05 16:33:17 +00:00
Aparup Ganguly
a301ff3e58
feat: add map and extract endpoints with v1 updates for scrape and crawl (#6787)
* feat: add new map extraction feature

* refactor: Improve Firecrawl component code quality and error handling

* refactor: Remove redundant output_types from Firecrawl API components

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Aparup Ganguly <aparup@Aparups-Mac-mini.local>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-05 15:50:16 +00:00
Gabriel Luiz Freitas Almeida
8f4515e655
fix: update data validation in Data model (#6789)
* fix: enhance data validation in Data model

* fix: Add warning for invalid data format in Data schema

Modify data validation to log a warning when data is not a dictionary, preparing for a future error in version 1.3.0

*  (test_data_class.py): add assertion to check if data attribute is an empty dictionary after calling get_text() method

* 🐛 (data.py): fix issue where values["data"] could be None, causing potential errors in the code. Now ensuring "data" key exists and is initialized as an empty dictionary if it is not present.

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2025-03-05 13:49:23 +00:00
Pedro Pacheco
92d4fd0d52
feat: implement S3 bucket uploader component and unit test (#6146)
* S3 Bucket Uploader, unit test and module init

* [autofix.ci] apply automated fixes

* Updated UT as per feedback

* Added version control fixture

* [autofix.ci] apply automated fixes

* Style changes requested by reviewer

* Really, 1 extra character?

* Ruf styling

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-05 13:34:55 +00:00
Gabriel Luiz Freitas Almeida
e5f654a752
refactor: sort json before exporting and add tags to flows (#6849)
* feat: Enhance flow download with recursive JSON sorting

- Add `sortJsonStructure` function to recursively sort object keys and array elements
- Improve `downloadFlow` function to create deterministic JSON output
- Add error handling for flow download process
- Ensure consistent and predictable JSON file generation

* feat: Include flow tags in export modal payload

Add `tags` to the export modal payload to ensure comprehensive flow metadata is preserved during export

* 📝 (model.py): Add tags field to FlowRead and FlowHeader models for better organization and categorization of flows
 (use-post-add-flow.ts): Add support for adding tags to a new flow in the frontend
 (exportModal/index.tsx): Include tags when exporting a flow in the export modal
♻️ (index.tsx): Refactor ListComponent to remove unnecessary comments and improve code readability
🔧 (reactflowUtils.ts): Update createNewFlow function to include tags field when creating a new flow

* style: add blank line

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2025-03-05 12:06:26 +00:00
tianzhipeng
037ffb620a
fix: langfuse trace get the right parent span (#6844)
* fix: langfuse trace get the right parent span

* [autofix.ci] apply automated fixes

* fix: langfuse callback from parent span

* [autofix.ci] apply automated fixes

---------

Co-authored-by: tianzhipeng-jk <tianzhipeng-jk@360shuke.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-03-04 08:06:57 +00:00
Marco Vinciguerra
60176778fb
feat: add search agent template (#6730)
* feat: add scrapegraphai integration

* [autofix.ci] apply automated fixes

* feat: add scrapegraph request to template

* [autofix.ci] apply automated fixes

* fix: removed python files

* Update __init__.py

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

* [autofix.ci] apply automated fixes

* reverting changes

* Update __init__.py

* Create Search agent.json

* update to templates

* Update Search agent.json

* clean-up-note

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-28 04:06:03 +00:00
Edwin Jose
8046008b50
feat: adding provider icon to agent (#6741)
* adding provider icon to agent

* Update model_input_constants.py

* fix: lint issues

* [autofix.ci] apply automated fixes

---------

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-02-27 20:12:53 +00:00
Ítalo Johnny
99057143ad
chore: raise clearer error when aget_messages is missing in memory (#6795)
* chore: raise clearer error when `aget_messages` is missing in memory

Add an explicit AttributeError when `aget_messages` is not found in
the external memory object, helping users diagnose the issue.

* [autofix.ci] apply automated fixes

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

* chore: adjust exception message length to pass lint check

* chore: rename variable

* [autofix.ci] apply automated fixes

* fix: adjusts condition to prevent tests from breaking

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-27 15:37:11 +00:00
Gabriel Luiz Freitas Almeida
1c89d9b871
fix: Add optional PostgreSQL dependencies for SQLAlchemy in langflow-base (#6865) 2025-02-27 08:29:17 -03:00
Christophe Bornet
5133f1cc19
refactor: Replace async_open by anyio.Path methods in tests (#6847)
Replace async_open by anyio.Path methods in tests

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-27 01:00:39 +00:00
Gabriel Luiz Freitas Almeida
2537d45be0
fix: Remove unnecessary logger warning in NVIDIA ingest component (#6843)
fix: Remove logger warning in NVIDIA ingest component

Remove unnecessary logger warning for NVIDIA ingest dependencies to simplify error handling
2025-02-26 22:14:52 +00:00
Lucas Oliveira
45536d55e5
fix: adds table dropdown cell editor using options defined in TableInput column (#6825)
* Added options parameter to table

* Removed shadow from no-border on ag cell

* Added Table Dropdown Cell Editor

* Added options to column field type

* Rendered dropdown instead of text if column has options

* Changed structured output to use new options

* Updated starter projects

* Refactor: Simplify TableOptions field definitions

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-26 21:37:09 +00:00
Lucas Oliveira
7b3dc0b453
fix: edges moving on just cloned flows (#6819)
* Changed export modal to just download after flow is built

* Changed cleanEdge to set edges animated to false

* Updated starter projects and tests to remove animated from edge

* update market research json to get global variable
2025-02-26 20:46:54 +00:00
Christophe Bornet
d9b8211a18
build: Bump ruff version to 0.9.7 (#6614)
* Bump ruff version to 0.9.7

* [autofix.ci] apply automated fixes

* refactor: Update Gmail Agent starter project to Langflow 1.2.0

This commit updates the Gmail Agent starter project with new node IDs and configuration reflecting Langflow version 1.2.0. Changes include:
- Updated node identifiers for Agent, ChatInput, ChatOutput, and ComposioAPI
- Refreshed project metadata and version information
- Minor adjustments to node configurations and viewport settings

* [autofix.ci] apply automated fixes

* fix: Revert Gmail Agent name to original

* fix: Remove trailing comma in Gmail Agent JSON

* feat: Add tags to Gmail Agent starter project

---------

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-02-26 20:36:36 +00:00
Gabriel Luiz Freitas Almeida
bca49a3335
refactor: Suppress SQLite foreign key warnings in Alembic migration (#6809)
Fix: Suppress SQLite foreign key warnings in Alembic migration

Handle SQLite-specific warnings during foreign key inspection in the Alembic migration script by using warnings.catch_warnings() to ignore foreign key constraint warnings
2025-02-26 20:16:19 +00:00
YuhangWuAI
6be666ec05
fix: prevent UnboundLocalError in MessageStoreComponent (#6802)
* fix: prevent UnboundLocalError in MessageStoreComponent

* [autofix.ci] apply automated fixes

* refactor: improve error message handling in MessageStoreComponent

* type: add type hint for stored_messages in MessageStoreComponent

---------

Co-authored-by: wuyuhang-jk <wuyuhang-jk@360shuke.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>
2025-02-26 19:55:10 +00:00
Gabriel Luiz Freitas Almeida
d092724d6a
fix: Fix crashes and enhance test reliability with session IDs (#6683)
* test: Add session ID parameter to ToolCallingAgentComponent test

* test: Add blocking for langchain_core runnables utility function

* test: Add session ID generation to agent component test

* fix: Safely delete agent message with ID check

Modify error handling in LCAgentComponent to only delete agent message if it has an ID attribute, preventing potential attribute errors

* test: Update ComponentToolkit test to use async start and verify results

Modify the test_component_tool_with_api_key test to:
- Use async_start() method for graph execution
- Add session ID to graph
- Improve result verification with vertex result tracking
- Update import path for ChatOutput component

* test: Skip cycle tests requiring LoopComponent

Update test_cycles.py to:
- Add skip markers for tests that now require a LoopComponent
- Improve error message with snapshots for debugging
- Preserve existing test logic while marking as skipped

* test: Add client fixture to tool calling agent test

Add usefixtures decorator to ensure client is available for the tool calling agent test, improving test setup and reliability

* test: Add client fixture to component tool test with API key

Enhance test_component_toolkit.py by adding the client fixture to the test_component_tool_with_api_key method, ensuring proper test setup for API key-dependent scenarios

* test: Add client fixture to agent component test with calculator

Add client fixture to the test_agent_component_with_calculator method to ensure proper test setup for API key-dependent scenarios

* test: Disable redundant component input tests

Remove commented-out test methods for checking required inputs across various components, as these tests were not providing significant value and the inputs are dynamic

* test: Comment out condition to skip nodes with Tool outputs in setup.py

* run formatter

* test: Re-enable condition to skip nodes with Tool outputs in setup.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-26 19:54:40 +00:00
Lucas Oliveira
0134485d5d
fix: implemented build stop functionality on polling, call cancel endpoint on build cancel (#6815)
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-25 19:11:23 -03:00
Mendon Kissling
13e2a43dec
fix: markdown note in research template (#6788)
fix-markdown-anchor
2025-02-25 18:30:17 +00:00
Gabriel Luiz Freitas Almeida
d02b4573e5
feat: Add flow build cancellation endpoint and functionality (#6813)
* feat: Add flow build cancellation endpoint and support

Implement new functionality to cancel ongoing flow build jobs:
- Add `cancel_flow_build` function in build.py to handle job cancellation
- Create new `/build/{job_id}/cancel` endpoint in chat.py
- Introduce `CancelFlowResponse` schema for cancellation response
- Implement robust error handling and logging for job cancellation process

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-25 17:17:12 +00:00
jbmolle
ea0c24e366
fix: add entity_id to the ComposioToolSet (#6805)
* fix: add entity_id to the ComposioToolSet

* feat: Add Composio API key to environment variables

* fix: Update Gmail Agent starter project to load API key from database

* fix: Configure Gmail Agent starter project to load OpenAI API key from database

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Jean-Baptiste <jb.molle@vescape.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>
2025-02-25 15:41:57 +00:00
Gabriel Luiz Freitas Almeida
73551b0d32
feat: Change default event delivery method to polling (#6811)
Change default event delivery method to polling
2025-02-25 15:17:31 +00:00
Gabriel Luiz Freitas Almeida
b5743ff980
fix: Enhance edge update logic and refactor edge data handling (#6808)
* feat: Enhance edge update logic with robust node reconciliation and type handling

Improves the `update_edges_with_latest_component_versions` function by:
- Adding comprehensive node reconciliation for missing nodes
- Implementing more robust type and handle matching
- Improving error logging and edge state tracking
- Adding detailed docstring explaining the function's complex logic
- Handling edge cases with null or missing node data
- Enhancing type conversion and handle escaping mechanisms

* refactor: update edge data
2025-02-25 15:10:45 +00:00
Christophe Bornet
afaf4ea0b1
fix: Fix URL for alembic migrations (#6806)
Fix URL for alembic migrations

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-25 14:35:02 +00:00
Cristhian Zanforlin Lousa
de45ea3427
Fix: error handling in data_to_text_list function (#6807)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-25 10:03:28 -03:00
Lucas Oliveira
3257c5720e
fix: handle null and boolean correctly on table parameter (#6722)
* Added Null, Undefined and Bool rendering to table

* Handling formatter to come from the backend in table definitions

* Added validator to make type as formatter and vice versa

* Added boolean case to show badge

* Added Toggle Cell Editor

* Supress Row Click Selection on Table node component

* ADd boolean as type for formatter

* Adds Boolean formatter type to show toggle editor

* run format_backend

*  (tableInputComponent.spec.ts): update unit test for table input component to use new methods for interacting with elements and improve readability and maintainability of the test code.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-02-24 21:33:34 +00:00
Cristhian Zanforlin Lousa
5e40c5f199
test: add FE tests for new starter project templates (#6772)
*  (Research Translation Loop.spec.ts): add integration test for Research Translation Loop functionality in the frontend to ensure proper functionality and behavior.

*  (Price Deal Finder.spec.ts): Add integration test for Price Deal Finder feature
📝 (Price Deal Finder.spec.ts): Document test cases and setup for Price Deal Finder feature
♻️ (Research Translation Loop.spec.ts): Refactor test setup and add missing test case for Research Translation Loop feature

* add tests to new started projects
2025-02-24 21:27:29 +00:00
Edwin Jose
38c895994a
feat: add setter to dataframe to handle missing text_keys (#6785)
* update the templates and add error handling

* [autofix.ci] apply automated fixes

* updated changes

* update to template from main

* Update split_text.py

* Add validation for text key in DataFrame setter

---------

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-02-24 20:47:56 +00:00