- Added `__init__.py` file to the `services` directory to make it a package.
- Created `Service` class in `base.py` to serve as a base class for different services.
- Implemented `ServiceFactory` class in `factory.py` to create instances of services.
- Implemented `ServiceManager` class in `manager.py` to manage the creation and retrieval of services.
- Created `ServiceType` enum in `schema.py` to define the different types of services that can be registered with the service manager.
- Added `initialize_services` function in `manager.py` to initialize all the services needed.
The purpose of these changes is to provide a modular and extensible architecture for managing different services in the application. The `ServiceManager` allows for easy creation and retrieval of services, while the `ServiceType` enum provides a standardized way to refer to different types of services. The `Service` base class and `ServiceFactory` class provide a foundation for creating and managing specific services.
The following files and classes were removed:
- `src/backend/langflow/cache/__init__.py`: Removed unused import statements and `__all__` variable.
- `src/backend/langflow/cache/base.py`: Removed unused `BaseCache` class.
- `src/backend/langflow/cache/flow.py`: Removed unused `InMemoryCache` class.
- `src/backend/langflow/cache/manager.py`: Removed unused `Subject`, `AsyncSubject`, and `CacheManager` classes.
These files and classes were removed to clean up the codebase and remove unused functionality.
🔥 refactor(utils.py): remove unused code and dependencies in utils.py module
🔥 refactor(chat): remove unused chat module and its configuration class
🔥 refactor(chat/manager.py): remove unused imports and classes from chat manager module
🔥 refactor(chat/utils.py): remove unused imports and function from chat utils module
🔥 refactor(database/__init__.py): remove empty file
🔥 refactor(database): remove unused database files and models
🔥 refactor(database): remove unused database files and models to improve code organization and reduce clutter
🔧 refactor(base.py): refactor DatabaseManager class to handle database operations and migrations
🔧 refactor(base.py): refactor session_getter function to use DatabaseManager instance
🔧 refactor(base.py): refactor get_session function to use DatabaseManager instance
🔧 refactor(models/__init__.py): add Flow model to __all__ list
🐛 fix(endpoints.py): update import statement to import merge_nested_dicts_with_renaming from utils.py
🐛 fix(endpoints.py): update function call to merge_nested_dicts_with_renaming to handle merging of native and custom components
🐛 fix(types.py): remove unused import statement for merge_nested_dicts from utils.py
🔨 refactor(types.py): add logging statements for debugging purposes in build_and_validate_all_files function
🔨 refactor(types.py): add logging statements for debugging purposes in build_valid_menu function
🔨 refactor(types.py): add logging statements for debugging purposes in build_invalid_menu function
🔧 fix(settings.py): update COMPONENTS_PATH to accept a list of strings instead of a list of Paths to improve flexibility and compatibility
🔧 fix(settings.py): update set_components_path method to handle LANGFLOW_COMPONENTS_PATH as a list of paths or a single path string
- Added a new file `__init__.py` in the `components` directory to import the `CustomComponent` class from `langflow.interface.custom.custom_component`.
- Created a new package `chains` in the `components` directory.
🔧 chore(__main__.py): remove unused env_file parameter and related code for simplification
🔧 chore(__main__.py): remove unused imports and variables for cleaner code
🔧 chore(__main__.py): remove unused load_params function for code cleanup
The following changes were made:
- Removed unused imports from the file
- Removed the unused `get_load_custom_component_from_path` endpoint
- Removed the unused `get_load_custom_component_from_path_test` endpoint
🐛 fix(directory_reader.py): add the output types of the custom component to the component template to ensure correct behavior
🐛 fix(types.py): add the output types of the custom component to the component template to ensure correct behavior