* feat: Google Drive Search Component
feat: Google Drive Search Component
Ability to search Google Drive and get back the relevant Doc id or Doc urls
* Updated Google Drive Search.py
* test: add tests for global variable endpoints
* test: add unit tests variable service
* fix: anticipate checks to prevent the code from breaking
* feat: add a new method to interface
* feat: add method to update fields in variable service
* feat: replace variable api code
* fix: mypy error
* fix: mypy error
* feat(variable): Allow deleting variables by name or ID in DatabaseVariableService.
* refactor(api): Simplify delete method in variable router.
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* add onEscapeKeyDown
* refactor: Add ConfirmationModal to CodeAreaModal for better user experience
* refactor: Update CodeAreaModal to use ReactAce for code editing
* fix closing o x modal
* refactor: Update CodeAreaModal to use ReactAce for code editing
* [autofix.ci] apply automated fixes
* decompose object
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: add initial implementation of dynamic state model creation and output getter in graph state module
* feat: implement _reset_all_output_values method to initialize component outputs in custom_component class
* feat: add state model management with lazy initialization and dynamic instance getter in custom_component class
* feat: Refactor Component class to use public method get_output_by_method
Refactor the Component class in the custom_component module to change the visibility of the method `_get_output_by_method` to public by renaming it to `get_output_by_method`. This change improves the accessibility and clarity of the method for external use.
* feat: add output setter utility to manage output values in state model properties
* feat: implement validation for methods' classes in output getter/setter utilities in state model to ensure proper structure
* feat: add state model creation from graph in state_model.py
* feat: enhance Graph class with lazy loading for state model creation from graph
* feat: add unit tests for state model creation and validation in test_state_model.py
* feat: add unit tests for state model creation and validation in test_state_model.py
* feat: add functional test for graph state update and validation in test_graph_state_model.py
* fix: update _instance_getter function to accept a parameter in component.py for state model instance retrieval
* refactor: rename test to clarify purpose in test_state_model.py for functional state update validation
* chore: import Finish constant in test_graph_state_model.py for improved clarity and usage in state model tests
* refactor: add optional validation in output getter/setter methods for improved method integrity in state model handling
* refactor: enhance state model creation with optional validation and error handling for output methods in model.py
* refactor: serialize and deserialize GraphStateModel in test_graph_state_model.py
* refactor: improve error message and add verbose mode for graph start in test_state_model.py
* refactor: remove verbose flag from graph.start in TestCreateStateModel for consistency in test_state_model.py
* refactor: disable validation when creating GraphStateModel in state_model.py for improved flexibility
* refactor: add validation documentation for method attributes in model.py to enhance code clarity and usability
* refactor: expand docstring for build_output_getter in model.py to clarify usage and validation details
* refactor: add detailed docstring for build_output_setter in model.py to improve clarity on functionality and usage scenarios
* refactor: add comprehensive docstring for create_state_model in model.py to clarify functionality and usage examples
* refactor: enhance docstring for create_state_model_from_graph in state_model.py to clarify functionality and provide examples
* test: add JSON schema validation in graph state model tests for improved structure and correctness verification
* refactor: Improve graph_state_model.json_schema unit test readability and structure.
* fixed patch update flow
* fixed update flow patch to receive id by payload
* created save flow hook with auto save and manual save functions
* fix poetry lock
* added auto save check with environment variable
* removed unused user
* separated autosave and put the flow as a creation with nodes and edges
* removed set nodes that skipped saving
* implemented auto save hook
* removed autosave from setNodes and setEdges
* added auto save hook and saved on viewport move and added useEffect to save on nodes and edges changed
* changed type of setNodes
* removed unused var
* removed deletion of empty flow
* Added saving of flow on button when autoSave is disabled
* disable saving when the nodes are empty
* removed save loading as false when the access token is renewed
* implemented useDebounce
* added save loading to save flow hook
* removed setting nodes and edges on fetching, since they are set when the current flow is updated
* removed unused var
* use debounce hook to save flow
* set nodes and edges on current flow id change
* removed useplaygroundeffect
* removed unused import
* put set save loading before the If
* removed flow cleaning and inputs setting, since the inputs and outputs are set on the ResetFlow function
* updated to use ResetFlow function to update everything regarding flow
* removed flow pool get on resetFlow, for it to be fetched only if the user is inside the flow
* updated packagelock
* Changed router to outlet on app.tsx to use createRouter
* Created authSettingsGuard to guard the general settings
* Fixed routes to use createBrowserRouter to allow the use of useBlocker
* Changed index.tsx to use RouterProvider and the router just created
* Changed flowStore to have a local flow state
* Implemented setting the current flow state when saving the flow
* Added the update of current flow when auto saving
* changed current flow to use the current flow from Flow Store instead of Flows Manager Store
* Changed codeTabsComponent Tweaks check to show if its checked
* Removed unused variables
* Removed browser router from context wrapper
* Removed unused console.log
* Changed initialSetup to just run when opening the modal
* changed confirmationModal to have destructiveCancel and to only call onCancel if the other buttons were not pressed
* Created a SaveChangesModal that confirms if the user wants to save their changes
* Get folder by id when folder id changes too
* Changed reset flow calls to store whole flow
* Added check if user is exiting page to prevent him when there are unsaved changes
* Added new types on ConfirmationModalType
* Implement save on clicking the save button on the header
* added save component shortcut to use save shortcut as save flow
* added save component shortcut on shortcutsStore type
* changed save shortcut to save component on node toolbar
* added save shortcut to header menubar
* changed shortcuts name to be compatible with existing ones
* changed shortcuts to be backwards compatible
* changed save to changes to maintain retrocompatibility
* changed save_component to save to maintain retrocompatibility
* Changed time difference to unsaved changes
* changed the toolbar select item to get the right save shortcut
* Changed save flow to use current flow from useFlowStore instead of the previous saved flow
* changed changesNotSaved to include flow name and metadata
* Added way of saving the flow settings just locally instead of directly to database
* Changed shareModal to save flow with hook
* removed old auto saving on connect
* Removed save functions from flowsManagerStore
* refactor: Remove unused imports and state variables in EditFlowSettings component
* use current flow not saved one and refactored page to not receive flow
* added check of isFlowPage to display the menubar
* Added checks to render playground if API key is valid and if Flows exists
* Added check to not display X on chat on playground page
* Updated flows variable to be undefined by start to prevent things from loading before flows initialize
* Implemented log builds parameter to not allow the builds to be logged if user not on flowPage
* feat: Gmail Loader component created
* [autofix.ci] apply automated fixes
* Updated Gmail.py
ran make format and ran make lint
* [autofix.ci] apply automated fixes
* Update Gmail.py
Errors Resolved.
Suggestion from @ogabrielluiz added.
Note this is a ChatLoader, since GmailLoader uses the BaseChatloader as base class.
But this would be a highly useful feature. if required i could rewrite the component as document loader. but either way this would be an amazing feature.
Planning to publish gmails tools also in next steps mostly.
* solved lint issues in Gmail.py
Key Changes:
1. Added Optional to the import statement.
2. Updated the type hint of label_ids to Optional[List[str]] to allow it to be None or a list of strings.
* remove commented
* remove commented
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
* fix: update value type in DefaultPromptField from str to Any for increased flexibility in input handling
* fix: replace _instantiate_input with instantiate_input for consistency in input instantiation across the codebase
* chore: update test durations
* update memory chatbot
* enhancement: Update PythonCodeStructuredTool to create inputs automatically and accept global variables
* [autofix.ci] apply automated fixes
* feat: Create a tool to search using SearXNG
* [autofix.ci] apply automated fixes
* refactor: reorganize imports and type annotations in PythonCodeStructuredTool.py for clarity and consistency
* refactor: clean up imports and enhance type annotations in SearXNGTool.py for improved readability and type safety
* refactor: Improved PythonCodeStructuredTool to allow arguments to have any types
* refactor: Formatted and refactored SearXNGTool
* refactor: Allowed RunnableExecutor to stream output and changed its build method to asynchronous.
---------
Co-authored-by: Haseong Kim <dynaferkim@gmail.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>
* feat: add error handling for Flow build
The code changes in `buildUtils.ts` add error handling for the Flow build process. It includes a new case for handling errors in the switch statement, which displays the error message and triggers the `onBuildError` function. This change ensures that errors during the Flow build are properly handled and the build process is stopped.
* feat: enhance error handling in build_flow to capture and report HTTP exceptions in the flow building process
* refactor: reorganize logger module and add setup.py for logging configuration
* refactor: update logger import path to align with recent module restructuring
* refactor: add logging configuration parameter to Graph initialization for improved logging setup flexibility
* feat: create logging init module for improved logger configuration and management
* refactor: update Settings class to include development mode flag and associated validator for enhanced configuration management
* refactor: enhance logger.py with DEV mode handling and TypedDict for log configuration settings
* feat: add settings module with DEV mode flag and helper functions for setting development state
* refactor: update flow assertions in tests to check for Data object type instead of Flow object type
* feat: add deepcopy method to Graph class to copy start and end components, ensuring proper graph cloning functionality
* feat: implement deepcopy method in Component class for proper cloning of inputs and configuration attributes
* feat: enhance attribute access in Component class to support backwards-compatible private attributes retrieval
* feat: improve test assertion for list_flows in custom component to display types of returned objects for better debugging
* feat: refactor imports in constants.py and remove redundant Data class definition for cleaner code structure
* feat: refactor imports in logger.py to include NotRequired from typing_extensions for better type hinting support
* feat: add diskcache package version 5.6.3 to poetry.lock and pyproject.toml for improved caching functionality
* refactor: simplify CacheMiss import in cache service files for better clarity and maintainability
* feat: Add AsyncDiskCache class for disk-based caching
* feat: Add disk caching option in CacheServiceFactory with AsyncDiskCache
* feat: Restrict cache_type to specific literals: async, redis, memory, disk for enhanced type safety and clarity
* feat: Change get_requester_result to async await for proper async handling in Vertex class
* fix: Update outputs dictionary in ResultData class to use key-value pairs for better readability and maintainability
* fix: Improve caching logic in Graph class by ensuring vertex builds properly handle exceptions and cache updates more reliably
* feat: Add teardown method to AsyncDiskCache for clearing cache directory during cleanup process
* fix: Correct variable name in Graph class to ensure proper handling of vertex results in caching logic
* feat: Clear AsyncDiskCache on initialization to align behavior with in-memory cache until frontend handling is implemented
feat: refactor sync_get_file_content_dicts to use get_file_content_dicts
Refactor the `sync_get_file_content_dicts` method in the `Message` class to use the `get_file_content_dicts` method instead. This change improves the code by using a more descriptive and accurate method name.
* fix: add task to end all traces on asyncio.CancelledError in build_flow function for better cleanup handling
* fix: replace ValueError with warnings in Graph class when vertices exist without edges for better logging and handling
* chore: add type annotations to test_vector_store_rag_add function
* feat: Fix assertion in test_create_flows to check for substring in name field
The assertion in the test_create_flows function was modified to check if the name field contains the substring "Flow 1" instead of an exact match. This change allows for more flexibility in the test and ensures that the test passes even if there are additional characters in the name field.
* feat: create google drive ingest component
It adds the basic implementation of the Google Drive Loader.
* feat: create google drive ingest component
Created a basic Google Drive loader component
* Updated the Icon
* updated the formatting
ran make format to update the formatting
* Addressed comments
* 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.
* fix: update PYTHON_REQUIRED extraction to correctly capture Python version
Changed the method of extracting the required Python version from `pyproject.toml`:
- Old method:
`PYTHON_REQUIRED=$(shell grep "^python" pyproject.toml | sed -n 's/.*"\(.*\)"$$/\1/p')`
- New method:
`PYTHON_REQUIRED=$(shell grep '^python[[:space:]]*=' pyproject.toml | sed -n 's/.*"\([^"]*\)".*/\1/p')`
The old method of capturing the Python version was too broad and could inadvertently match other dependencies starting with "python" (e.g., `python-socketio`, `python-dotenv`). This could lead to incorrect extraction of the required Python version, potentially causing version mismatches and failures in environment setup.
* fix: update PYTHON_REQUIRED extraction to correctly capture Python version
Changed the method of extracting the required Python version from `pyproject.toml`:
- Old method:
`PYTHON_REQUIRED=$(shell grep "^python" pyproject.toml | sed -n 's/.*"\(.*\)"$$/\1/p')`
- New method:
`PYTHON_REQUIRED=$(shell grep '^python[[:space:]]*=' pyproject.toml | sed -n 's/.*"\([^"]*\)".*/\1/p')`
The old method of capturing the Python version was too broad and could inadvertently match other dependencies starting with "python" (e.g., `python-socketio`, `python-dotenv`). This could lead to incorrect extraction of the required Python version, potentially causing version mismatches and failures in environment setup.
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: update docker-build.yml to conditionally retrieve version and adjust tagging logic for Docker images in workflows
* Refactor release workflow to separate base and main package handling
- Split `release_package` input into `release_package_base` and `release_package_main`
- Add new inputs for building Docker images: `build_docker_base` and `build_docker_main`
- Update conditional checks and job dependencies to reflect new inputs
- Separate Docker build workflows for base and main packages
* Refactor release.yml to introduce separate inputs for base and main packages, enhancing workflow flexibility and clarity
* chore: update release.yml to set default pre-release option to false, reflecting new workflow strategy
* chore: add pre-release check to release.yml to validate version format before proceeding with the workflow
* chore: remove deprecated pre-release workflows, consolidating configuration for cleaner CI/CD process
* chore: modify pre-release check in release.yml to use poetry version for validation, enhancing version format accuracy
* chore: refine pre-release version check in release.yml for improved regex validation, ensuring accurate version detection