* Fixed bug where starter projects were refactored incorrectly
* fix: improve handling of selected outputs in custom component template builder
- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.
* Set selected output as the previous selected output
* Update base.py
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* feat: add formatPayloadTweaks utility and integrate into API code generation
* feat: integrate formatPayloadTweaks utility for centralized payload processing in API code generation
* refactor: clean up formatPayloadTweaks import and improve curl command formatting
* refactor: remove commented code and streamline payload processing in APITabsComponent
* fix: uncomment TextInput in INPUT_TYPES constant
* fix: uncomment TextInput in INPUT_TYPES and update filter-tweaks to include it
* refactor: update OutputComponent styles and enhance dropdown functionality
* Adjusted text size in OutputComponent for better readability.
* Improved dropdown button styling and added hover effects.
* Enhanced dropdown content layout to display output types alongside names.
* Added console log for outputs to assist in debugging.
* refactor: remove console log from OutputComponent for cleaner code
* refactor: streamline GenericNode component and enhance NodeOutputs functionality
* Removed conditional rendering for hidden outputs in GenericNode for cleaner code.
* Introduced hasExistingHiddenOutputs prop to NodeOutputs for better state management.
* Updated OutputComponent styles for improved visual consistency and output type display.
* style: update OutputComponent padding for improved layout
* Added padding to the OutputComponent for better spacing and visual consistency.
* Update pass_message.py
* Update src/backend/base/langflow/components/logic/pass_message.py
Co-authored-by: Eric Hare <ericrhare@gmail.com>
---------
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
* only allow customvals and options to be in the options list
* ✨ (general-bugs-dropdown-select-not-in-list.spec.ts): add additional test cases to cover dropdown selection functionality and ensure correct behavior in the frontend application
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* Update loop.py
* [autofix.ci] apply automated fixes
* Update loop-component.spec.ts
* change dataframe input name to inputs
* [autofix.ci] apply automated fixes
* 🐛 (typescript_test.yml): increase the maximum shard count to 40 to improve test distribution and efficiency
* 🔧 (typescript_test.yml): adjust optimal shard count calculation to use a maximum of 10 shards instead of 40 for better test distribution
🐛 (loop-component.spec.ts): fix getByTestId selector to match the updated element ID for testing purposes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* ⚡️ Speed up method `JobQueueService.create_queue` by 630% in PR #5940 (`refactor-build-flow`)
Certainly! To optimize the provided `JobQueueService` class to run faster, we should ensure the code efficiency in creating event managers and handling queues. We can speed up the process by making the following changes.
1. Remove redundant logger calls if they don't provide essential debugging or monitoring information.
2. Inline `create_default_event_manager` function to avoid redundant function calls while ensuring that the `EventManager` setup remains efficient.
3. Ensure faster dictionary access and error message handling.
Here is the rewritten and optimized code.
In this optimization.
1. The `create_queue` method was streamlined to reduce redundancy checks and fewer logger messages.
2. The `create_default_event_manager` function is integrated directly as `_create_default_event_manager` private method within the class.
3. Utilized list iteration instead of multiple function calls to register events efficiently in the `EventManager`.
These changes aim to maintain functionality while improving performance where possible, particularly in the setup process.
* fix: improve error messages in JobQueueService for better clarity
* [autofix.ci] apply automated fixes
* refactor: Relax event type constraint in EventManager
Change event type from a strict literal to a more flexible string type, allowing for greater extensibility in event registration
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* fix: update send_event method to use str for event_type
* fix: change event_type parameter to str and handle invalid types in create_event_by_type
* fix: Add noqa comment to suppress linting warning for access_host assignment
---------
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* chore: update langchain-anthropic dependency to version 0.3.14 and adjust revision in uv.lock
* fix: add workaround for handling function calling in Anthropic output processing
* Fix indentation
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix: remove duplicate error message in _extract_output_text function
* fix: update _build_llm_model to handle missing attributes gracefully
* fix: handle max_tokens default value and improve error handling in AnthropicModelComponent
* fix: enhance input handling in Component class to manage deepcopy errors
* fix: add 'no_blockbuster' marker to pytest configuration for improved test control
* fix: refactor agent component tests to include all OpenAI and Anthropic models, improving validation and error reporting
* fix: update agent components to include pydantic validation and improve error handling across multiple starter projects
* fix: set default max_tokens value in AnthropicModelComponent and improve API URL handling
* fix: enhance error reporting in AgentComponent tests by capturing exceptions and response discrepancies for all Anthropic models
* chore: update package versions in uv.lock, including alembic, arize-phoenix-otel, bce-python-sdk, boto3-stubs, botocore-stubs, tornado, and others for improved compatibility and features
* fix: update agent components across multiple starter projects to include new imports and improve error handling
* fix: streamline max_tokens handling in AnthropicModelComponent for improved clarity and robustness
* [autofix.ci] apply automated fixes
* fix: update artifacts_raw type to allow None for better flexibility
* fix: initialize artifacts_raw as an empty dict if None to prevent errors
* fix: specify type for similarity_score to enhance type safety and clarity
* fix: refactor JSON parsing to improve variable naming and clarity
* fix: skip flaky test in Portfolio Website Code Generator until stabilized
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* Add nginx body size upload limit config
* Add nginx body size upload limit config
* Rename env variable to match existing max upload
* Rename env variable to match existing max upload
* Add export of Max_file_size_upload variable
* Add unit to max body size
* Remove unit from default assignment
* Apply comments and move config to default nginx conf template
---------
Co-authored-by: daniel.kaestner <daniel.kaestner@cas.de>
Co-authored-by: Dexter192 <DanielKaestner@otlook.de>
* refactor: Simplify flow execution and update input handling in MCP API
- Replaced `InputValueRequest` with `SimplifiedAPIRequest` for cleaner input management.
- Updated flow execution logic to utilize `simple_run_flow`, enhancing clarity and performance.
- Removed unnecessary background task handling and streamlined progress updates.
- Improved message collection from flow outputs, ensuring robust handling of results.
* fix: Add error handling for tool execution in MCP API
- Implemented a try-except block around the flow execution to catch and handle exceptions gracefully.
- Enhanced message collection logic to ensure that errors during tool execution are communicated back as text content.
- Improved robustness of the `handle_call_tool` function by ensuring all potential errors are captured and reported.
* fix: Improve error messaging in tool execution for MCP API
- Updated error handling in the `handle_call_tool` function to provide more descriptive error messages.
- Changed the error message format to include the flow name, enhancing clarity for debugging purposes.
- Ensured that all exceptions during tool execution are captured and reported as text content.
* refactor: Enhance message and result handling in handle_call_tool
- Improved the logic for processing outputs in the `handle_call_tool` function to handle messages and results more comprehensively.
- Streamlined the collection of text content from both messages and results, ensuring all relevant outputs are captured.
- Enhanced robustness by ensuring that all outputs are processed, regardless of their structure.
* refactor: Improve progress notification handling in handle_call_tool
- Updated the logic for progress task creation in the `handle_call_tool` function to ensure it only initializes when progress notifications are enabled and a progress token is present.
- Enhanced the cancellation and exception handling of the progress task to prevent potential errors when it is not created.
- Improved overall robustness of the function by ensuring that progress updates are managed correctly based on the current context.
* refactor: Streamline flow execution and message handling in ProjectMCPServer
- Replaced `InputValueRequest` with `SimplifiedAPIRequest` for improved input management.
- Updated flow execution to utilize `simple_run_flow`, enhancing clarity and performance.
- Refined progress notification handling to ensure tasks are only created when necessary.
- Improved message collection from flow outputs, ensuring robust handling of both messages and results.
- Enhanced error handling during tool execution to provide clearer feedback on failures.
* refactor: enhance progress update handling in ProjectMCPServer
Updated the send_progress_updates function to accept a progress token as an argument, improving its flexibility. Adjusted the task cancellation logic to use asyncio.gather for better exception handling. This change aims to streamline progress notifications when enabled.
* refactor: add group_outputs property to message configurations in starter projects
* Added truncation items as constant and reduced it to 100
* Added truncation test to regression
* get max items length from config
* changed typo in backend