* Add UI feature flag config
* [autofix.ci] apply automated fixes
* hide general settings if there is nothing to show
* make sure to handle !autoLogin case
* [autofix.ci] apply automated fixes
* missed commit
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* refactor: Update useFileDrop hook to handle multiple file drops
The useFileDrop hook in use-on-file-drop.tsx has been updated to handle multiple file drops. It now accepts an array of files instead of a single file, and processes each file individually. This allows for uploading multiple files at once and improves the user experience.
* [autofix.ci] apply automated fixes
* Remove unused console.log
* Removed console.log
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
* refactor(utils.py): simplify data processing logic in build_data_from_result_data function for better readability and maintainability
* feat: set default output type to "chat" in run_flow function
* refactor(FlowTool.py): refactor FlowToolComponent class to inherit from LCToolComponent
* Fixed Flow as Tool component
* Fixed FlowTool to only output tool and removed async function def
* [autofix.ci] apply automated fixes
* Fixed lint
---------
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Add Athena icon component
Add a new component called AthenaComponent that renders an SVG icon for Athena. This component is imported from the newly created file "athena.jsx" in the "icons/athena" directory. Additionally, an export for the AthenaIcon component is added in the "icons/athena/index.tsx" file.
* Update docs from Notion
* feat: Add RAG (Retrieval-Augmented Generation) components documentation
This commit adds documentation for RAG (Retrieval-Augmented Generation) components. It explains how these components process a user query by retrieving relevant documents and generating a concise summary that addresses the user's question. The documentation includes information about the Vectara component, its parameters, and the Vectara corpus. For more details, refer to the [Vectara documentation](https://docs.vectara.com/docs).
---------
Co-authored-by: ogabrielluiz <ogabrielluiz@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* check nodes to update on build flow
* feat: update componentsToUpdate logic in flowStore.ts
The `updateComponentsToUpdate` function in `flowStore.ts` has been updated to properly check for outdated nodes. This ensures that components are only updated when necessary, improving performance and preventing unnecessary re-renders.
* [autofix.ci] apply automated fixes
* Update src/frontend/src/stores/flowStore.ts
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: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: update langchain-core to version 0.2.24
* refactor: convert inner messages to BaseMessage in load_lc_prompt method
* refactor: update ChatPromptTemplate instantiation in message.py
* refactor: update langflow-base dependency to use local path for development
* [autofix.ci] apply automated fixes
* refactor: update ChatPromptTemplate instantiation in message.py
* refactor: add async_from_template_and_variables and sync from_template_and_variables
* feat(tests): add unit test for Message schema serialization and prompt loading
* refactor: update langchain-core dependency to version 0.2.24
* chore: new lock
* mypy
* chore: format pyproject
* refactor: rename async_from_template_and_variables to from_template_and_variables in Message class
* refactor: Rename async_from_template_and_variables to from_template_and_variables in Message class
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
* Updates and changes to the Makefile:
1. Added removal of `frontend` directory inside `src/backend/base/langflow/` and `build` directory inside `src/frontend/` to the `clean_npm_cache` target.
2. Added descriptive comments for the `build_and_install`, `build_and_run`, `fix_codespell`, `setup_poetry`, `unit_tests`, `integration_tests`, and `tests_frontend` targets.
Looking forward to your feedback.
* Improvements: Structure and Functionality Improvements
- Reorganized commands to facilitate understanding of the structure
- Enhanced check_tools to detect the Python version
- Added a multi-environment script to support check_tools
- make init now builds the frontend and runs the application
- Aesthetic improvements in output messages
TO-DO:
- Reorganize container-related commands
- Reorganize other miscellaneous utilities
- Document usage in the application docs
- Prepare the dev environment following the maintainers' recommended practices
* Removed pre-commit as it is no longer used.
* Restored 'patch' command in Makefile, it updates the 'pyproject.toml' with the new project version.
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 📝 (flows.py): refactor delete_multiple_flows function to improve readability and efficiency
✨ (use-delete-flows.ts): add useDeleteFlows hook to handle deletion of multiple flows in frontend
♻️ (index.tsx): refactor handleDeleteMultiple function to use useDeleteFlows hook for deleting multiple flows
🔧 (actionsMainPage-shard-1.spec.ts): add test for selecting and deleting a flow in end-to-end tests
* 📝 (flows.py): Remove unused imports and variables to clean up the code and improve readability
♻️ (flows.py): Refactor code to remove unnecessary import and variable declarations, making the code more concise and maintainable
* add unit tests to delete multiple flows with transactions and build
* format
* add assert on tests
feat: Update Textarea component to have full height
The Textarea component was updated to have a full height by adding the "h-full" class to the parent div. This ensures that the textarea takes up the entire available vertical space.
* feat: Add GitLoader Component with advanced filtering options
This commit introduces the GitLoaderComponent, enabling users to load files from a Git repository with advanced filtering options.
GitLoader Component:
- Implementation of the GitLoaderComponent to load files from a Git repository using the `langchain_community.document_loaders.git.GitLoader` module.
- Advanced filtering option using `file_filter` to include or exclude specific files based on their extensions or other criteria.
Examples of `file_filter` usage:
- Include only .py files: `lambda file_path: file_path.endswith('.py')`
- Exclude .py files: `lambda file_path: not file_path.endswith('.py')`
This component ensures a flexible and customizable approach for loading documents from Git repositories, enhancing the user experience with advanced filtering capabilities.
Features:
- Support for loading documents from Git repositories.
- Advanced file filtering options to include or exclude specific files.
* feat: Add GitLoader Component with advanced filtering options
This commit introduces the GitLoaderComponent, enabling users to load files from a Git repository with advanced filtering options.
GitLoader Component:
- Implementation of the GitLoaderComponent to load files from a Git repository using the `langchain_community.document_loaders.git.GitLoader` module.
- Advanced filtering option using `file_filter` to include or exclude specific files based on their extensions or other criteria.
Examples of `file_filter` usage:
- Include only .py files: `lambda file_path: file_path.endswith('.py')`
- Exclude .py files: `lambda file_path: not file_path.endswith('.py')`
This component ensures a flexible and customizable approach for loading documents from Git repositories, enhancing the user experience with advanced filtering capabilities.
Features:
- Support for loading documents from Git repositories.
- Advanced file filtering options to include or exclude specific files.
* fix: Ensure proper evaluation and validation of file_filter in GitLoaderComponent
This commit fixes the issue where the GitLoaderComponent would fail if the file_filter input was not evaluated correctly. Changes include:
- Added a check to ensure that file_filter is a valid string before calling eval.
- Ensured that the evaluated file_filter is callable, otherwise it defaults to None.
* [autofix.ci] apply automated fixes
* feat: Enhance GitLoaderComponent with dynamic inputs, content filtering
- Changed inputs from `StrInput` to `MessageTextInput` to enable dynamic use with agents.
- Added `content_filter` field to allow additional content filtering using regex.
- Updated `file_filter` to support glob format, simplifying usage for users.
- Implemented binary file removal filter to exclude binary files from queries, aligning with the agent's purpose.
* [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>
* fix: tool calling and openai tools do not include chat history
* fix import
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (constants.ts): add BUILDS endpoint to URLs constants
✨ (index.ts): create index file for builds-related queries
✨ (use-delete-builds.ts): implement useDeleteFLowPool hook for deleting builds
* ✨ (chatView): integrate useDeleteFlowPool hook for deleting flow pool
♻️ (chatView): refactor clearChat function to use mutateFlowPool for deletion
* ♻️ (use-delete-builds.ts): rename useDeleteFLowPool to useDeleteBuilds for clarity
♻️ (index.tsx): update import and usage of useDeleteFLowPool to useDeleteBuilds
* ✨ (API): add use-get-builds query to fetch build data
✨ (PageComponent): integrate use-get-builds query for fetching builds
✨ (flowStore): add setters for inputs, outputs, and hasIO in flowStore
* ♻️ (flowStore.ts): refactor hasIO to derive its value from inputs and outputs
🔥 (flowStore.ts): remove unused resetFlow function to clean up the codebase
* ♻️ (use-get-builds.ts): refactor useGetBuildsQuery to remove unused params
✨ (PageComponent): add logic to handle flow state, inputs, outputs, and viewport
♻️ (flowStore): refactor and add resetFlow method to handle flow state reset
* ✅ (chatComponent): add data-testid attributes for better testability
✅ (generalBugs-shard-3.spec.ts): add end-to-end test for playground button state
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
✨ (headerComponent/index.tsx): Add functionality to handle user logout in the header component
🔧 (api.tsx): Add useLogout and useRefreshAccessToken functions to handle user logout and access token refresh
🔧 (use-post-logout.ts): Implement useLogout function to handle user logout functionality
🔧 (use-post-refresh-access.ts): Implement useRefreshAccessToken function to handle access token refresh
🔧 (authStore.ts): Remove unnecessary imports and update the authStore functionality for user logout and access token management.
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* ♻️ (crud.py): refactor delete_vertex_builds_by_flow_id function to correctly delete vertex builds by flow_id using relationship attribute instead of column comparison.
* 📝 (generalBugs-shard-0.spec.ts): Remove unnecessary test case and add new test case for chat messages clearing functionality
✨ (generalBugs-shard-8.spec.ts): Add new test case for interacting with API request
✨ (generalBugs-shard-9.spec.ts): Add new test case for testing chat memory functionality
* Fixed refresh button and refresh parameter
* Refactored Multiselect component and implemented custom values on it
* Fixed default values
* Made Backend support combobox on Dropdown and Multiselect
* refactor: improve recursive serialization function
Refactor the `recursive_serialize_or_str` function in the `schema.py` file to improve its readability and maintainability. The function now uses a try-except block to handle exceptions and returns a string representation of the object if an exception occurs. This ensures that the function always returns a string, preventing any unexpected errors. Additionally, the function now includes additional checks for different object types, such as dictionaries, lists, and instances of `BaseModel`. These checks ensure that the function correctly serializes complex objects and avoids any potential issues. Overall, this refactoring improves the code quality and reliability of the `recursive_serialize_or_str` function.
* feat(artifact.py): add support for recursive serialization of items in ARRAY artifact type to ensure consistent data handling
* feat(schema.py): add support for serializing arrays in build_output_logs function to handle LogType.ARRAY case
* fix: remove create task call
* feat: Add support for custom component message storage
The code changes in `types.py` add support for storing messages in custom components. If a custom component has the attributes `should_store_message` and `store_message`, the `store_message` method will be called to store the message. This enhancement improves the functionality of the interface vertex in the graph.
The OpenAI client instantiation was removed from the `AssistantsGetAssistantName` and `AssistantsListAssistants` components. This commit fixes the issue by adding back the OpenAI client instantiation in the `process_inputs` method of both components.
* fix: update TextAreaComponent styling for edit node table
Adjust the styling of the TextAreaComponent in the edit node table to fix the positioning of eye icon
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: create useDeleteApiKey hook to handle api keys delete
* refactor: use mutation to handle delete api key
* [autofix.ci] apply automated fixes
* feat: create useGetApiKeys hook
* refactor: use useGetApiKeysQuery hook to get api keys data
* [autofix.ci] apply automated fixes
* refactor: change interface name
* refactor: remove unnused loading state and use react state instead of react ref to ensure component render
* fix: multiple refreshs when auto_login=false
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* merge
* [autofix.ci] apply automated fixes
* support for MultilineSecretInput
* add support for MultilineSecretInput
* [autofix.ci] apply automated fixes
* ruff
* align eye-icon
* tweaks and modal
* [autofix.ci] apply automated fixes
* textare edit modal hidden text plus eye icon
* fix pydantic serialization warning
* [autofix.ci] apply automated fixes
* chore: Add password visibility toggle to text area components
* [autofix.ci] apply automated fixes
* fix list assistants
* fix: remove extraneous property from is-unicode-supported dependency
* fix: update TextAreaComponent styling for edit node table
Adjust the styling of the TextAreaComponent in the edit node table to fix the positioning of the side-bar button. The right margin of the button was changed from 5.2rem to 4.2rem to align it correctly with the text area. This change improves the visual consistency of the edit node table.
* fix modal not sync with outside state
* add comment for future devs
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* feat(pyproject.toml): add langchain-core dependency version 0.2.23 to the project
* feat(pyproject.toml): update version 1.0.14 and 0.0.90 for langflow and langflow-base packages
* First implementation of LangWatch tracer
* Remove dependency from backend base internal and add langwatch docs
* Bump langwatch to v0.1.4
* Fix missing log parameter on method
* Move docs to the right folder
* chore: update lock
* Add Vectara RAG component and docs
* [autofix.ci] apply automated fixes
* refactor: update VectaraRAG component to the new component standard
* fix: update VectaraRagComponent filter parameter
Update the filter parameter in the VectaraRagComponent class to use the correct variable name 'self.filter' instead of 'filter'. This ensures that the correct filter value is passed to the VectaraQueryConfig object.
* fix: add condition to set_cache_coro in Graph class
Add a condition to the `set_cache_coro` function call in the `Graph` class. The condition checks if the `cache` variable is true and the `flow_id` is not empty before calling the function. This ensures that the cache is set only when both conditions are met, improving the efficiency of the code.
---------
Co-authored-by: Rogério Chaves <rogeriochaves@users.noreply.github.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>