Right now the Azure OpenAI Embeddings component doesn't allow you to pick the embedding model to use. The same models are available that OpenAI make available, so I used the constant that lists them to pull from.
* uv sync works
* fist stab at Makefile
* uv treatment for langflow-base
* sqlmodel to 0.0.18
* add reinstall_backend to Makefile
* makefile - reinstall_backend fix and unit_test dependency
* fix dev dependencies
* fix dev dependencies
* fix dev dependencies
* lock
* Makefile
* [autofix.ci] apply automated fixes
* Update Makefile
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* delete update_dependencies
* fix lint
* Remove Poetry lock check from GitHub Actions workflow
* Switch to 'uv' for dependency management and caching in style-check workflow
* Update style-check workflow to use '--only-dev' flag for Ruff check
* Integrate 'uv' package setup and caching in GitHub Actions workflows
* Update version check in GitHub Actions to use 'uv tree' for langflow-base
* Remove redundant poetry environment setup in GitHub Actions workflow
* Add step to minimize uv cache in GitHub Actions workflow
* Update GitHub Actions workflow to use 'uv' for dependency management and caching
* Remove redundant script execution from build_langflow target in Makefile
* [autofix.ci] apply automated fixes
* Switch build system from Poetry to Hatchling and update dependencies
- Replace `poetry-core` with `hatchling` in build-system requirements
- Update `langflow-base` dependency to version `0.0.96`
- Add `tool.hatch.build.targets.wheel` configuration
- Adjust `tool.uv.sources` paths for `langflow-frontend` and `langflow-base`
* update lock
* Switch build system from Poetry to Hatchling in pyproject.toml
* Add langchain-unstructured dependency to pyproject.toml
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* ✅ (general-bugs-shard-3909.spec.ts): add test case to ensure user can create a new flow by clicking on "Start Here" button
* ✨ (componentsComponent/index.tsx): Add NewFlowModal component to allow users to create a new flow
📝 (componentsComponent/index.tsx): Update ComponentsComponent to handle opening and closing of NewFlowModal
* ✨ (emptyComponent/index.tsx): refactor EmptyComponent to use useIsFetching hook from @tanstack/react-query for loading state and pass handleOpenModal as a prop to improve code readability and maintainability
* ✨ (componentsComponent/index.tsx): refactor handleOpenModal function to improve code readability and maintainability
* refactor: Refactor file path rewriting logic
This commit refactors the logic for rewriting file paths in the `rewrite_file_path` function. The function now splits the file path by "/" and checks if it has at least two parts. If it does, it creates a consistent file path by concatenating the last two parts. If not, it returns the original file path. This change improves the consistency of file paths in the codebase.
Refactor the file path rewriting logic in the `rewrite_file_path` function.
* refactor: Refactor file path rewriting logic and treat file paths in InterfaceVertex
* Refactor file path rewriting logic and treat file paths in InterfaceVertex
* Refactor file path rewriting logic and treat file paths in InterfaceVertex
* Refactor file path rewriting logic and treat file paths in InterfaceVertex
* ✨ (general-bugs-shard-3836.spec.ts): update test description to be more specific about the tool used for sending images on chat
📝 (general-bugs-shard-3836.spec.ts): remove unused import of readFileSync from fs module
* ✅ (test_rewrite_file_path.py): add unit tests for the rewrite_file_path function to ensure correct behavior with various file path scenarios
* ♻️ (utils.py): refactor file_path function to handle both forward and backward slashes and extract file path after drive letter if present
* style: fix single quotes, commas, and spaces
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
## Changes Overview
This PR introduces several enhancements to our data handling components and removes some legacy code:
1. **CreateData and UpdateData Components**:
- Added text key name validation
- Enhanced UpdateData to support updating and appending multiple data points
- Implemented optional text key validator for dynamically loaded data
- Updated component names, descriptions, and default values
2. **New SelectData Component**:
- Implemented SelectDataComponent for data selection from a list
- Added inputs for data list and index selection
- Implemented error handling for out-of-range index selection
3. **Code Cleanup**:
- Removed legacy post_code_processing methods from CreateDataComponent and UpdateDataComponent
- Removed corresponding test cases
4. **Testing**:
- Added unit tests for CreateData and UpdateData components
- Updated test file names for consistency
* Update HuggingFaceInferenceAPIEmbeddings.py
update to use inference api from hugging face
* Enhance HuggingFaceEndpointsComponent with additional parameters
- Add FloatInput for top_p, typical_p, temperature, and repetition_penalty
- Update create_huggingface_endpoint and build_model methods to include new parameters
- Set default values and info for new inputs
ToDo Need to update the Package
from langchain_community.llms.huggingface_endpoint import HuggingFaceEndpoint
since its depreciated.
* Updated HuggingFaceModel Solving Lint Error
Updated HuggingFaceModel Solving Lint Error
* Update HuggingFaceModel.py
Added Inference Endpoint as an input from user to support custom inference endpoints
* Update HuggingFaceModel.py
paper references removed
* 🐛 (inputFileComponent/index.tsx): add check for file size before uploading to prevent uploading files larger than the maximum allowed size
* ✨ (alerts_constants.tsx): add new constant INVALID_FILE_SIZE_ALERT to display an alert message when the file size is too large
* ✨ (constants.ts): add constant maxSizeFilesInBytes to define the maximum file size allowed for upload in bytes
* 🐛 (inputFileComponent/index.tsx): update INVALID_FILE_SIZE_ALERT parameter from 9 to 10 to match the new file size limit
🐛 (constants/constants.ts): increase maxSizeFilesInBytes constant value from 9MB to 10MB to reflect the new file size limit
* Add run_id setting to FlowTool with warning on failure
* feat: Add try-except block to set run_id in FlowTool
The try-except block is added to handle any exceptions that may occur when setting the run_id in the FlowTool class. If an exception occurs, a warning is issued and the run_id is set to None. This ensures that the code does not break if there is an error in setting the run_id.
* refactor: Add useIsFetching hook for folder fetching in DropdownButtonComponent
* refactor: Improve folder sidebar buttons component
Refactor the folder sidebar buttons component to improve its structure and readability. This includes adding a new hook for folder fetching, handling rendering and filtering functionality, and updating the UI for adding and uploading folders. The changes also include handling double-click and keydown events for folder items, as well as fixing some bugs related to folder editing and deleting. These improvements enhance the overall user experience and maintainability of the codebase.
* refactor: Remove unused import and variable in DropdownButtonComponent
* refactor: Remove unused import and variable in DropdownButtonComponent
- Remove unused import and variable in DropdownButtonComponent
- Add useIsFetching hook for folder fetching in DropdownButtonComponent
* refactor: Remove unused import and variable in DropdownButtonComponent
* refactor: Add cascade delete functionality for flows
This commit adds a new function `cascade_delete_flow` to the `utils.py` file in the `langflow.api` module. This function is responsible for deleting related records when a flow is deleted. It uses the `delete` method from SQLAlchemy to delete records from the `TransactionTable` and `VertexBuildTable` tables based on the flow ID. Finally, it deletes the flow record itself from the `Flow` table.
The function is wrapped in a try-except block to handle any exceptions that may occur during the deletion process. If an exception is raised, a `RuntimeError` is raised with an appropriate error message.
This refactor improves the code by encapsulating the cascade delete logic in a separate function, making it more modular and easier to maintain.
* refactor: Add cascade delete functionality for flows
* refactor: Add cascade delete functionality for flows and folders
* refactor: Remove unused delete_flow_by_id function
* refactor: Add cascade delete functionality for flows and folders
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* 📝 (XMLAgent.py): Add support for chat history data input in XMLAgentComponent to enhance agent functionality and interaction with Language Model.
* [autofix.ci] apply automated fixes
* 📝 (XMLAgent.py): Update user_prompt to system_prompt and adjust its content for better clarity and consistency
🐛 (XMLAgent.py): Ensure user_prompt contains 'input' key before creating agent runnable to prevent errors
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Deleted "personal" from manage your projects
* Removed animations from alerts on the dropdown
* Changed useDeleteFlow to return isPending as well
* Added delete loading to components and added filter of components not present in "flows" for deletion
* added isDuplicating as a isMutating with the postAddFlow
* 🔧 (pyproject.toml): add duckduckgo-search dependency to the project
✨ (DuckDuckGoSearchRun.py): introduce DuckDuckGoSearchComponent for performing web searches using DuckDuckGo search engine
✨ (DuckDuckGo.jsx): add SVG icon for DuckDuckGo
✨ (index.tsx): create DuckDuckGoIcon component for displaying DuckDuckGo icon
🔧 (styleUtils.ts): import DuckDuckGoIcon for nodeIconsLucide in styleUtils
* 📝 (DuckDuckGoSearchRun.py): remove unnecessary whitespace to improve code readability and consistency
* ✨ (DuckDuckGoSearchRun.py): Add retry logic to DuckDuckGo search component for rate-limited requests
📝 (DuckDuckGoSearchRun.py): Update component description to reflect the addition of retry logic
📝 (DuckDuckGoSearchRun.py): Add new inputs for max_retries and initial_delay to configure retry behavior
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method with retry logic
📝 (DuckDuckGoSearchRun.py): Update format_results method to handle formatted results
📝 (DuckDuckGoSearchRun.py): Add search_with_retry method to handle search with retry logic
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method
📝 (DuckDuckGoSearchRun.py): Update search_response method to set status messages
📝 (DuckDuckGoSearchRun.py): Handle exceptions and set appropriate status messages in search_response method
✨ (duckduckgo.spec.ts): Add integration test for DuckDuckGo search component in frontend
* 📝 (DuckDuckGoSearchRun.py): add newline at the end of the file to follow best practices and avoid potential issues with some tools that expect it
* [autofix.ci] apply automated fixes
* updating duckudckgo
* [autofix.ci] apply automated fixes
* ✨ (DuckDuckGoSearchRun.py): Refactor DuckDuckGoSearchComponent to use pydantic BaseModel for schema definition and improve code structure for better readability and maintainability. Add support for result limiting in search functionality.
* 🔧 (DuckDuckGoSearchRun.py): Remove unnecessary import and update status message for DuckDuckGo Search Tool to improve clarity
* [autofix.ci] apply automated fixes
* ✨ (duckduckgo.spec.ts): update test selectors for duckduckgo search component to match changes in the frontend code and improve test reliability
* 🐛 (linkComponent.spec.ts): fix an issue where the key combination for selecting all text was not working correctly on Mac devices. Updated the key combination to use the correct modifier key based on the user's operating system.
* 📝 (frontend): mark is-unicode-supported package as extraneous in package-lock.json
* rollback lock file
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Add run_id parameter to set run ID in graph within load_and_run_flow function
* Add run_id parameter to run_flow call in FlowTool for tracking runs
* Add run_id parameter to CustomComponent's run_flow method
* fix: mypy error arg-type
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
* ✨ (inputs/__init__.py): Add LinkInput class to support linking functionality in inputs
📝 (inputs/input_mixin.py): Add Link field type to support linking functionality in inputs
📝 (inputs/inputs.py): Add LinkInput class to support linking functionality in inputs
📝 (io/__init__.py): Import and export LinkInput class for linking functionality in inputs
📝 (frontend/src/components/linkComponent/index.tsx): Create LinkComponent to display and handle links in frontend components
📝 (frontend/src/components/parameterRenderComponent/index.tsx): Add support for rendering LinkComponent in parameter rendering based on template type
📝 (frontend/src/constants/constants.ts): Add "link" as a supported type for LANGFLOW_SUPPORTED_TYPES
📝 (frontend/src/types/api/index.ts): Add icon and text fields to InputFieldType for link component
📝 (frontend/src/types/components/index.ts): Define LinkComponentType for passing link data to LinkComponent
✨ (linkComponent.spec.ts): Add unit test for link component interaction to ensure proper functionality and behavior
📝 (unit-test-components.spec.ts): Add template for a unit test file to be used for testing components in the frontend application
* style: apply make format
* Update input_mixin.py
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>