* ✨ (get-curl-code.tsx): add support for ENABLE_DATASTAX_LANGFLOW feature flag to include Authorization header in curl command if flag is enabled
* 🐛 (get-curl-code.tsx): fix conditional logic for adding x-api-key header in curl command to correctly handle authentication status
---------
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
🔧 (use-get-refresh-flows-query.ts, use-get-refresh-flows.ts): Add check for AxiosError status to handle specific error case and set error message accordingly.
✨ (frontend): introduce ENABLE_IMAGE_ON_PLAYGROUND feature flag to control image functionality on playground
📝 (frontend): update feature-flags.ts to include ENABLE_IMAGE_ON_PLAYGROUND flag
🔧 (frontend): update input-wrapper.tsx, use-drag-and-drop.ts, and chat-view.tsx to conditionally enable image functionality based on ENABLE_IMAGE_ON_PLAYGROUND flag
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* feat: implement direct event delivery method on the frontend
- Updated buildFlow function to include eventDelivery parameter, allowing for "direct" event delivery mode.
- Modified NodeStatus and IOModal components to utilize the new eventDelivery setting.
- Expanded flowStore and buildUtils to support event delivery options, improving flexibility in event handling.
- Added "direct" option to event delivery types in enums for better configurability.
- Updated tests to cover new event delivery modes.
* Update src/frontend/src/controllers/API/api.tsx
* Update src/frontend/src/utils/buildUtils.ts
* refactor: remove "direct" from event delivery modes in tests
- Updated the event delivery modes in the withEventDeliveryModes utility to exclude "direct", aligning with recent changes in event handling behavior.
- This change simplifies the testing setup and ensures consistency with the current application logic.
* feat: add "direct" to event delivery modes in tests
- Expanded the event delivery modes in the withEventDeliveryModes utility to include "direct", enhancing the testing coverage for this delivery method.
- This update ensures that tests reflect the latest event handling capabilities and improves the robustness of the testing framework.
---------
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
* Removed msg from nvidia_ingest
* Added default file picker timeout
* Use bigger timeout for file picker
* Added condition to only say that file was uploaded successfully if there are files
fix: ignore ConnectionError in NVIDIA model component in case there's no internet connection
- Added logging for connection issues when accessing the NVIDIA API.
- Implemented exception handling for ConnectionError, MaxRetryError, and NameResolutionError to improve robustness and user feedback.
* Removed old toolbar
* Add enable_publish check before showing Shareable Playground
* Removed enable_publish condition on play button
* Removed enable_publish condition on playground title
* Removed unused import
⬆️ (frontend): upgrade moment-timezone dependency to version 0.5.48
✨ (frontend): add new utility function convertUTCToLocalTimezone to convert UTC timestamps to local timezone in flowLogsModal and utils files
* add ENV to Dockerfile
* 📝 (deployment-docker.md): Update formatting and indentation for better readability and consistency in the deployment Docker documentation.
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* feat: add new event delivery method "direct"
- Updated event_delivery options in ConfigResponse and Settings to include "direct".
- Modified build_flow function to utilize settings_service for conditional event handling.
- Improved flow processing by returning job_id or event responses based on delivery method.
* feat: implement direct event delivery method on the frontend
- Updated buildFlow function to include eventDelivery parameter, allowing for "direct" event delivery mode.
- Modified NodeStatus and IOModal components to utilize the new eventDelivery setting.
- Expanded flowStore and buildUtils to support event delivery options, improving flexibility in event handling.
- Added "direct" option to event delivery types in enums for better configurability.
- Updated tests to cover new event delivery modes.
* fix: change default event delivery method to "polling"
- Updated the default value of event_delivery in Settings from "direct" to "polling" to align with intended behavior.
- Ensured documentation reflects the change in default settings for clarity on event delivery options.
* Update src/frontend/src/controllers/API/api.tsx
* Update src/frontend/src/utils/buildUtils.ts
* Update src/frontend/src/utils/buildUtils.ts
* Update src/frontend/src/utils/buildUtils.ts
* feat: add event delivery validation for multi-worker environments
- Introduced a new field validator for the `event_delivery` setting to enforce "direct" delivery when the number of workers exceeds one.
- This change ensures compatibility with multi-worker setups, improving the robustness of event handling in the application.
* feat: add warning for multi-worker event delivery
- Added a warning log in the Settings class to notify users when a multi-worker environment is detected, indicating that "direct" event delivery will be used. This enhances visibility and understanding of event handling behavior in such setups.
* refactor: remove "direct" from event delivery modes in tests
- Updated the event delivery modes in the withEventDeliveryModes utility to exclude "direct", aligning with recent changes in event handling behavior.
- This change simplifies the testing setup and ensures consistency with the current application logic.
---------
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
* old composio Gmail component
* Update gmail_composio.py
* [autofix.ci] apply automated fixes
* Removed input types from secret input
* Changed starter projects
* Update gmail_composio.py
* composio base
* [autofix.ci] apply automated fixes
* updated composio with multi output
* [autofix.ci] apply automated fixes
* fix lint errors
* [autofix.ci] apply automated fixes
* Added sortableList and connect to frontend types constant
* Added AuthInput to backend and frontend constant
* Added auth input to InputTypes and added show = false by default
* fix: Update Composio icon (#7407)
fix: update Composio icon dimensions and simplify SVG structure
* Fix amber color
* Fix button and voice assistant button to use correct design and colors
* Fixed button design to include bg
* remove bg definition from voice assistant
* Added auth input to composio base
* Added helper text to sortable list
* Add unlink icon
* Add node connection button
* Changed to isPolling
* [autofix.ci] apply automated fixes
* Added auth tooltip
* Added auth tooltip to mixinn
* Add auth mixin to input
* update the field visibility
* Fixed disconnect
* Update composio_base.py
* Updated node status to show correct statuses
* Added handling for API errors and disconnections
* limit to dataframe output
* add basic tests for base and gmail component
* fix lint errors
* 📝 (test files): Remove unnecessary blank lines to improve code readability and consistency.
* Add result_field to GMAIL_FETCH_EMAILS action and change how result key is used
* fix: Add validation for result structure in ComposioGmailAPIComponent
* fix: Ensure result is a list of dicts before converting to DataFrame in ComposioBaseComponent
* feat: Introduce get_result_field option for Gmail actions to control result retrieval behavior
* Fixed status not updating in real time
* Added default API value to Composio
* Made sortableList only be openable if no helper text is present
* fix: Update validation logic in ComposioGmailAPIComponent to incorporate get_result_field option for improved result handling
* Fixed bug where pre-filled Global Variable didn't trigger login
* refactor: Remove commented-out output definitions in ComposioBaseComponent for cleaner code
* refactor: Clean up ComposioGmailAPIComponent by removing outdated comments for improved readability
* ✨ (NodeStatus/index.tsx): refactor getConnectionButtonClasses and getConnectionIconClasses functions to improve code readability and maintainability
* ♻️ (NodeStatus/index.tsx): refactor getConnectionButtonClasses and getConnectionIconClasses functions to use arrow function syntax for better readability and maintainability
* 🔧 (NodeStatus/index.tsx): define constants POLLING_TIMEOUT and POLLING_INTERVAL for better readability and maintainability
* ✨ (ListSelectionComponent): Add dataTestId prop to ListItem component for better testing
📝 (NodeStatus): Refactor data-testid value to be dynamically generated based on node status
📝 (searchBarComponent): Add data-testid attribute to search input for testing purposes
📝 (sortableListComponent): Add data-testid attribute to button for opening list selection
♻️ (utils.ts): Add testIdCase function to convert string to snake_case for test ids
📝 (composio.spec.ts): Add various test cases for interacting with composio component
* ✨ (test_gmail.py): add MagicMock import to fix missing dependency for testing
🔧 (test_gmail.py): refactor execute_action method to return a structure compatible with component's logic
♻️ (test_gmail.py): refactor _build_wrapper method to return a mock for the toolset
✨ (test_gmail.py): add patching for _actions_data to ensure correct structure for GMAIL_FETCH_EMAILS
🔧 (test_gmail.py): refactor execute_action method to return mock data for testing as_dataframe method
🔧 (test_gmail.py): refactor as_dataframe method to handle mock email data and verify DataFrame content
🔧 (test_gmail.py): refactor execute_action method to return mock data for testing update_build_config method
🔧 (secretKeyModal/index.tsx): remove unused imports and clean up the file structure
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* ✨ (webhookFieldComponent): Add support for ENABLE_DATASTAX_LANGFLOW feature flag to conditionally show generate token button
🐛 (use-get-config): Set default value for webhook polling interval if not provided in data
♻️ (custom-secret-key-modal-button): Refactor to pass modal props as a separate object to improve readability and maintainability
🔧 (use-generate-token): Add new file for generating token function
🔧 (secretKeyModal): Refactor to use generate token function based on ENABLE_DATASTAX_LANGFLOW flag and separate modal props into a dedicated interface
* ✨ (constants.ts): add default polling interval and timeout constants for better code readability and maintainability
♻️ (use-get-config.ts): refactor to use the newly added default constants for polling interval and timeout to improve code consistency and reduce duplication
* 🐛 (typescript_test.yml): update the maximum shard count calculation to be 25 instead of 10 to improve test distribution and efficiency
* ⚙️ (typescript_test.yml): adjust optimal shard count calculation to ensure a maximum of 10 shards for test execution
♻️ (index.tsx): refactor modalConfigProps assignment to handle cases where modalProps is null or undefined
---------
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* Removed flowPool from dependencies of function that clears chat input
* remove console.log
---------
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
* feat: add nodeId, nodeClass, and handleNodeClass props to dropdown and string render components
* fix: remove extraneous flag from package-lock.json and add nodeId, nodeClass, handleNodeClass props to ParameterRenderComponent
---------
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* chore: Add trustcall dependency to pyproject.toml
* fix: Update bind_tools method to include optional tool_choice parameter for enhanced flexibility in tool binding
* refactor: Update StructuredOutputComponent to utilize create_extractor for structured output and enhance result handling
* Replaced direct call to with_structured_output with create_extractor for improved flexibility.
* Added handling for "responses" in result to ensure proper data extraction.
* Introduced is_last_pydantic_output_parser method to check parser type in structured output processing.
* test: Add comprehensive tests for StructuredOutputComponent with OpenAI and NVIDIA models
* Implemented multiple test cases for StructuredOutputComponent using real OpenAI and NVIDIA models.
* Added tests for simple, complex, and nested schemas to validate structured output extraction.
* Included error handling tests to ensure proper response to model limitations and API errors.
* Utilized pytest for conditional test execution based on environment variables for API keys.
* refactor: Update JSON starter projects to include StructuredOutputComponent with enhanced input and output handling
* Integrated StructuredOutputComponent into Financial Report Parser and Portfolio Website Code Generator starter projects.
* Updated input fields to include detailed descriptions and requirements for structured output generation.
* Ensured consistent schema definitions and improved error handling for model limitations.
* Enhanced documentation for better clarity on component usage and expected outputs.
* [autofix.ci] apply automated fixes
* refactor: Remove unused PydanticOutputParser method from StructuredOutputComponent
* Deleted is_last_pydantic_output_parser method as it was no longer necessary for structured output processing.
* Cleaned up the code to enhance maintainability and readability.
* refactor: Update JSON starter projects to enhance StructuredOutputComponent integration
* Refactored Financial Report Parser and Portfolio Website Code Generator to streamline the StructuredOutputComponent.
* Removed unused PydanticOutputParser method to improve code clarity and maintainability.
* Enhanced input descriptions and requirements for structured output generation.
* Improved error handling and documentation for better user guidance.
* [autofix.ci] apply automated fixes
* refactor: Simplify response handling in StructuredOutputComponent
* Updated the response extraction logic to use the walrus operator for cleaner code.
* Improved readability by replacing the previous conditional check with a more concise approach.
* Ensured consistent handling of structured output results.
* [autofix.ci] apply automated fixes
* refactor: Remove unnecessary TYPE_CHECKING import and simplify type casting in StructuredOutputComponent
* Eliminated the TYPE_CHECKING import for improved clarity.
* Simplified the type casting of the language model in the response extraction logic.
* Enhanced code readability and maintainability.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* refactor: reorder response handling in StructuredOutputComponent for clarity
* refactor: unify StructuredOutputComponent code across multiple starter projects for consistency
* Standardized the implementation of StructuredOutputComponent in Financial Report Parser, Image Sentiment Analysis, Market Research, and Portfolio Website Code Generator.
* Enhanced code clarity and maintainability by ensuring uniformity in input and output definitions across these components.
* refactor: update build_structured_output method in StructuredOutputComponent to include text_key
* Modified the build_structured_output method to return a Data object with a text_key for improved clarity in output structure.
* Ensured consistency across various starter projects by aligning the output format of StructuredOutputComponent.
* [autofix.ci] apply automated fixes
* 🔧 (structured_output.py): refactor create_extractor function to support structured data extraction in a specific format specified by schema_name
💡 (structured_output.py): add tool_description variable to provide a description for the structured data extraction tool
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* ♻️ (structured_output.py): refactor code to simplify the creation of extractor with tools parameter and remove unnecessary tool_description and schema_name variables.
* [autofix.ci] apply automated fixes
* ✨ (structured_output.py): enhance documentation by adding a dynamic docstring to the output model creation, improving clarity on the schema's purpose.
* ✨ (structured_output.py): update structured output component across multiple starter projects to enhance consistency and clarity in output schema definitions. Improved documentation and dynamic docstring integration for better understanding of the structured data extraction process.
* 🔧 (typescript_test.yml): enhance test command by adding retries to Playwright tests for improved stability and reliability during CI runs. Cleaned up whitespace for better readability.
* feat: add sample resume for testing and update test to use new file
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
* Fix amber color
* Fix button and voice assistant button to use correct design and colors
* Fixed button design to include bg
* remove bg definition from voice assistant
* Add Homeassistant Component
https://www.home-assistant.io/
* Add files via upload
* Add files via upload
* refactor: rename Home Assistant control and state listing components
Introduced two new components for Home Assistant integration:
1. HomeAssistantControl: A tool for controlling Home Assistant devices, allowing actions like turn_on, turn_off, and toggle with specified entity IDs.
2. ListHomeAssistantStates: A tool to retrieve the current states of Home Assistant entities, with optional filtering by domain.
Both components include necessary input fields and documentation links for user guidance.
* refactor: format Home Assistant SVG component and index file for consistency
* fix: spread props in Home Assistant SVG component for better customization
* refactor: update Home Assistant icon and improve SVG structure for better readability
---------
Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
✨ (constants.ts): add new constants for OpenAI voices to be used in the application
🔧 (audio-settings-dialog.tsx, voice-select.tsx, check-provider.ts, voiceStore.ts): import and use the newly added OpenAI voices constants in various components and store to improve maintainability and consistency in voice selection functionality
* Changed polling build error handling
* Awaited pollBuildEvents for error to be thrown
* fix: enhance error handling and logging in get_flow_events_response
* fix: introduce custom exception for job queue not found error
* fix: replace ValueError with custom JobQueueNotFoundError in get_flow_events_response
* ⚡️ Speed up method `JobQueueService.get_queue_data` by 1,704% in PR #7387 (`fix/be_connection_errors`) (#7388)
To optimize the `JobQueueService` implementation for better runtime and memory efficiency, we can implement some optimizations focused mainly on avoiding redundant checks and streamlining the handling of job queues. The most significant improvement that can be made without altering the functionality would be to remove redundant error logging and to optimize our coroutine handling.
Here is the optimized version.
### Key Changes.
1. **Removed Redundant Logging**: The error logging inside the `get_queue_data` method was removed. In a production system where performance is critical, it’s often better to rely on exception handling rather than logging each potential error before raising the exception, especially for common errors which can be anticipated by the system. Instead, we directly raise `JobQueueNotFoundError`.
2. **Streamlined Exception Handling**: Replaced the dictionary lookup and manual check with a try-except block, simplifying the code and ensuring that the KeyError is handled efficiently. This avoids checking the condition and then looking up the dictionary again.
3. **Retained Essential Functionality**: All core functionalities and method signatures have been maintained, ensuring that the refactored code behaves identically to before. This includes maintaining the `self._closed` check to prevent operations on a closed service and handling of exceptions to provide appropriate error messages.
By focusing on reducing redundant operations like extra logging and double-checking conditions, we improve the software’s runtime performance and maintain cleaner code.
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
* fix: improve error handling in JobQueueService by raising JobQueueNotFoundError with original exception context
* fix: update error message for job not found in test cases
* fix: enhance error handling in cancel_build by adding JobQueueNotFoundError exception
* fix: improve error handling in cancel_build by logging JobQueueNotFoundError details
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
* feat: enhance animations and improve ListSelectionComponent functionality
- Added overlay and content animations to tailwind.config.mjs for smoother transitions.
- Updated ListSelectionComponent to reset search input when the dialog opens and improved item display styling.
- Refactored ConnectionComponent to utilize the new onSelection prop in ListSelectionComponent for better selection handling.
* fix: refine animation timings and enhance ListSelectionComponent layout
- Adjusted animation durations in tailwind.config.mjs for smoother transitions.
- Updated ListSelectionComponent to increase maximum height for improved content display.
* feat: enhance ListSelectionComponent with hover functionality and keyboard navigation
- Added mouse enter and leave handlers to ListItem for improved user interaction.
- Implemented keyboard navigation to select items using the Enter key when an item is hovered.
- Updated styling for ListItem to enhance visual feedback during hover states.
* feat: enhance ListItem with hover state and selection feedback
- Added hover state management to ListItem, allowing visual feedback when an item is hovered.
- Updated the rendering logic to display a "Select" label and an icon when the item is hovered.
- Improved the selection indicator for better user experience.
* feat: enhance ListSelectionComponent with keyboard navigation and focus management
- Added keyboard navigation to allow users to select items using the Arrow keys and Enter key.
- Implemented focus management to highlight the currently focused item in the list.
- Updated the component to reset focus and search input when the dialog opens or the filtered list changes.
- Improved item rendering to visually indicate focus state.
* feat: enhance ListSelectionComponent with improved keyboard navigation and hover management
- Added state management for keyboard navigation to improve user experience when selecting items.
- Implemented hover state clearing during keyboard navigation to prevent visual conflicts.
- Updated ListItem to conditionally apply hover styles based on keyboard navigation state.
- Enhanced focus management to reset when the filtered list changes or when the dialog opens.
* fix: refine animation timings and update ListSelectionComponent layout
- Adjusted clipPath values in tailwind.config.mjs for improved overlay animations.
- Increased animation durations for overlay and content transitions to enhance smoothness.
- Removed unnecessary padding in ListSelectionComponent for a cleaner layout.
* refactor: update ListSelectionComponent styles for improved visual consistency
- Changed text color and background color classes in ListItem to enhance readability and maintain design consistency.
- Updated icon color to align with the new text styling for better visual integration.
* [autofix.ci] apply automated fixes
* fix: improve ListSelectionComponent behavior and cleanup event listeners
* fix: adjust minimum height of ListSelectionComponent dialog for better usability
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* test: add concurrent streaming request tests for chat input type
Implemented a new test for concurrent streaming requests to the run endpoint with chat input type. Added a helper coroutine to validate the streaming response, ensuring proper event handling and result verification. This enhances the test coverage for the streaming functionality.
* refactor: replace session_getter with session_scope in API key CRUD operations
Updated the API key CRUD operations to utilize session_scope instead of session_getter for better session management. This change enhances the clarity and robustness of the database interactions.
* test: enhance assertions and error handling in streaming tests
Refactored assertions in the streaming tests to provide clearer error messages and improve robustness. Added error handling for JSON parsing in the stream response and ensured that all expected fields are validated with informative messages. Updated the test for concurrent streaming requests to use the correct project ID and modified input values for better clarity.
* test: refactor get_starter_project fixture for improved session management and data handling
Updated the `get_starter_project` fixture to use `session_scope` for better session management. Enhanced the flow data processing by replacing the OpenAI API key and ensuring the `load_from_db` flag is set to false, improving robustness and clarity in test setup.
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>