* Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent
* Move uuid import to global imports
* fix test with new text spliter
* update poetry lock
* ci: add continue-on-error to py_autofix.yml
---------
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* refactor: update deprecated call to get_actions
* Update composio-langchain dependency to version 0.5.13 in pyproject.toml
* Downgrade `composio-langchain` dependency to version `0.5.9` in `pyproject.toml`
* Add missing import for CustomComponent in test_custom_component.py
* fix: Problem in the description field when using the MariaDB or MySQL database.
* fix: Problem in the description field when using the MariaDB or MySQL database.
* fix: Add the migration script to update description columns type.
* [autofix.ci] apply automated fixes
* Update src/backend/base/langflow/alembic/versions/1d90f8a0efe1_update_description_columns_type.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: add component clickhouse for vector database
* feat: add component clickhouse for vector database - conflicts resolved
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* feat: add component clickhouse for vector database - conflicts resolved
* feat: add component clickhouse for vector database - update poetry
* feat: add component clickhouse for vector database - conflicts resolved
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 🔧 (pyproject.toml): add lark dependency to support parsing and processing of grammars in the project
♻️ (SelfQueryRetriever.py): refactor input types in metadata fields to improve clarity and maintainability
* 📝 (SelfQueryRetriever.py): Update class name and imports for consistency and clarity
📝 (SelfQueryRetriever.py): Refactor input and output definitions for better readability and maintainability
📝 (SelfQueryRetriever.py): Refactor method signatures and variable names for improved code organization and understanding
* [autofix.ci] apply automated fixes
* ♻️ (SelfQueryRetriever.py): Remove unused import 'VectorStore' to clean up the code and improve maintainability.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: bump composio version
* [autofix.ci] apply automated fixes
* chore(poetry.lock): update Poetry version from 1.8.2 to 1.8.3
chore(poetry.lock): remove milvus_lite-2.4.9-py3-none-manylinux2014_aarch64.whl package from lock file
* [autofix.ci] apply automated fixes
* fix(poetry.lock): update Poetry version from 1.8.2 to 1.8.3 to reflect the actual version used
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* build: Update boto3 version to 1.34.162.
* ci(langchain-aws): Bump version to ^0.1.16.
* build: Update langchain-anthropic and langchain-openai versions.
* chore: set new lock file
* refactor: update code references to use _code instead of code
* refactor: add backwards compatible attributes to Component class
* refactor: update Component constructor to pass config params with underscore
Refactored the `Component` class in `component.py` to handle inputs and outputs. Added a new method `map_outputs` to map a list of outputs to the component. Also updated the `__init__` method to properly initialize the inputs, outputs, and other attributes. This change improves the flexibility and extensibility of the `Component` class.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: change attribute to use underscore
* refactor: update CustomComponent initialization parameters
Refactored the `instantiate_class` function in `loading.py` to update the initialization parameters for the `CustomComponent` class. Changed the parameter names from `user_id`, `parameters`, `vertex`, and `tracing_service` to `_user_id`, `_parameters`, `_vertex`, and `_tracing_service` respectively. This change ensures consistency and improves code readability.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: update BaseComponent to accept UUID for _user_id
Updated the `BaseComponent` class in `base_component.py` to accept a `UUID` type for the `_user_id` attribute. This change improves the type safety and ensures consistency with the usage of `_user_id` throughout the codebase.
* refactor: import nanoid with type annotation
The `nanoid` import in `component.py` has been updated to include a type annotation `# type: ignore`. This change ensures that the type checker ignores any errors related to the `nanoid` import.
* fix(custom_component.py): convert _user_id to string before passing to functions to ensure compatibility with function signatures
* feat(component.py): add method to set output types based on method return type to improve type checking and validation in custom components
* refactor: extract method to get method return type in CustomComponent
* refactor(utils.py): refactor code to use _user_id instead of user_id for consistency and clarity
perf(utils.py): optimize code by reusing cc_instance instead of calling get_component_instance multiple times
* refactor(utils.py, base.py): change parameter name 'add_name' to 'keep_name' for clarity and consistency in codebase
* [autofix.ci] apply automated fixes
* refactor: update schema.py to include Edge related typres
The `schema.py` file in the `src/backend/base/langflow/graph/edge` directory has been updated to include the `TargetHandle` and `SourceHandle` models. These models define the structure and attributes of the target and source handles used in the edge data. This change improves the clarity and consistency of the codebase.
* refactor: update BaseInputMixin to handle invalid field types gracefully
The `BaseInputMixin` class in `input_mixin.py` has been updated to handle invalid field types gracefully. Instead of raising an exception, it now returns `FieldTypes.OTHER` for any invalid field type. This change improves the robustness and reliability of the codebase.
* refactor: update file_types field alias in FileMixin
The `file_types` field in the `FileMixin` class of `input_mixin.py` has been updated to use the `alias` parameter instead of `serialization_alias`. This change ensures consistency and improves the clarity of the codebase.
* refactor(inputs): update field_type declarations in various input classes to use SerializableFieldTypes enum for better type safety and clarity
* refactor(inputs): convert dict to Message object in _validate_value method
* refactor(inputs): convert dict to Message object in _validate_value method
* refactor(inputs): update model_config in BaseInputMixin to enable populating by name
The `model_config` attribute in the `BaseInputMixin` class of `input_mixin.py` has been updated to include the `populate_by_name=True` parameter. This change allows the model configuration to be populated by name, improving the flexibility and usability of the codebase.
* refactor: update _extract_return_type method in CustomComponent to accept Any type
The _extract_return_type method in CustomComponent has been updated to accept the Any type as the return_type parameter. This change improves the flexibility and compatibility of the method, allowing it to handle a wider range of return types.
* refactor(component): add get_input and get_output methods for easier access to input and output values
The `Component` class in `component.py` has been updated to include the `get_input` and `get_output` methods. These methods allow for easier retrieval of input and output values by name, improving the usability and readability of the codebase.
* refactor(vertex): add get_input and get_output methods for easier access to input and output values
* refactor(component): add set_output_value method for easier modification of output values
The `Component` class in `component.py` has been updated to include the `set_output_value` method. This method allows for easier modification of output values by name, improving the usability and flexibility of the codebase.
* feat: add run_until_complete and run_in_thread functions for handling asyncio tasks
The `async_helpers.py` file in the `src/backend/base/langflow/utils` directory has been added. This file includes the `run_until_complete` and `run_in_thread` functions, which provide a way to handle asyncio tasks in different scenarios. The `run_until_complete` function checks if an event loop is already running and either runs the coroutine in a separate event loop in a new thread or creates a new event loop and runs the coroutine. The `run_in_thread` function runs the coroutine in a separate thread and returns the result or raises an exception if one occurs. These functions improve the flexibility and usability of the codebase.
* refactor(component): add _edges attribute to Component class for managing edges
The `Component` class in `component.py` has been updated to include the `_edges` attribute. This attribute is a list of `EdgeData` objects and is used for managing edges in the component. This change improves the functionality and organization of the codebase.
* fix(component.py): fix conditional statement to check if self._vertex is not None before accessing its attributes
* refactor(component): add _get_fallback_input method for handling fallback input
The `Component` class in `component.py` has been updated to include the `_get_fallback_input` method. This method returns an `Input` object with the provided keyword arguments, which is used as a fallback input when needed. This change improves the flexibility and readability of the codebase.
* refactor(component): add TYPE_CHECKING import for Vertex in component.py
* refactor(component): add _map_parameters_on_frontend_node and _map_parameters_on_template and other methods
The `Component` class in `component.py` has been refactored to include the `_map_parameters_on_frontend_node` and `_map_parameters_on_template` methods. These methods are responsible for mapping the parameters of the component onto the frontend node and template, respectively. This change improves the organization and maintainability of the codebase.
* refactor(component): Add map_inputs and map_outputs methods for mapping inputs and outputs
The `Component` class in `component.py` has been updated to include the `map_inputs` and `map_outputs` methods. These methods allow for mapping the given inputs and outputs to the component, improving the functionality and organization of the codebase.
* refactor(component): Add Input, Output, and ComponentFrontendNode imports and run_until_complete function
This commit refactors the `component.py` file in the `src/backend/base/langflow/custom/custom_component` directory. It adds the `Input`, `Output`, and `ComponentFrontendNode` imports, as well as the `run_until_complete` function from the `async_helpers.py` file. These changes improve the functionality and organization of the codebase.
* refactor(component): Add map_inputs and map_outputs methods for mapping inputs and outputs
* refactor(component): Add _process_connection_or_parameter method for handling connections and parameters
The `Component` class in `component.py` has been updated to include the `_process_connection_or_parameter` method. This method is responsible for handling connections and parameters based on the provided key and value. It checks if the value is callable and connects it to the component, otherwise it sets the parameter or attribute. This change improves the functionality and organization of the codebase.
* refactor(frontend_node): Add set_field_value_in_template method for updating field values
The `FrontendNode` class in `base.py` has been updated to include the `set_field_value_in_template` method. This method allows for updating the value of a specific field in the template of the frontend node. It iterates through the fields and sets the value of the field with the provided name. This change improves the flexibility and functionality of the codebase.
* refactor(inputs): Add DefaultPromptField class for default prompt inputs
The `inputs.py` file in the `src/backend/base/langflow/inputs` directory has been refactored to include the `DefaultPromptField` class. This class represents a default prompt input with customizable properties such as name, display name, field type, advanced flag, multiline flag, input types, and value. This change improves the flexibility and functionality of the codebase.
* feat: Add Template.from_dict method for creating Template objects from dictionaries
This commit adds the `from_dict` class method to the `Template` class in `base.py`. This method allows for creating `Template` objects from dictionaries by converting the dictionary keys and values into the appropriate `Template` attributes. This change improves the flexibility and functionality of the codebase.
* refactor(frontend_node): Add from_dict method for creating FrontendNode objects from dictionaries
* refactor: update BaseComponent to use get_template_config method
Refactored the `BaseComponent` class in `base_component.py` to use the `get_template_config` method instead of duplicating the code. This change improves code readability and reduces redundancy.
* refactor(graph): Add EdgeData import and update add_nodes_and_edges method signature
The `Graph` class in `base.py` has been updated to include the `EdgeData` import and modify the signature of the `add_nodes_and_edges` method. The `add_nodes_and_edges` method now accepts a list of dictionaries representing `EdgeData` objects instead of a list of dictionaries with string keys and values. This change improves the type safety and clarity of the codebase.
* refactor(graph): Add first_layer property to Graph class
The `Graph` class in `base.py` has been updated to include the `first_layer` property. This property returns the first layer of the graph and throws a `ValueError` if the graph is not prepared. This change improves the functionality and organization of the codebase.
* refactor(graph): Update Graph class instantiation in base.py
The `Graph` class in `base.py` has been updated to use keyword arguments when instantiating the class. This change improves the readability and maintainability of the codebase.
* refactor(graph): Add prepare method to Graph class
The `Graph` class in `base.py` has been updated to include the `prepare` method. This method prepares the graph for execution by validating the stream, building edges, and sorting vertices. It also adds the first layer of vertices to the run manager and sets the run queue. This change improves the functionality and organization of the codebase.
* refactor(graph): Improve graph preparation in retrieve_vertices_order function
The `retrieve_vertices_order` function in `chat.py` has been updated to improve the graph preparation process. Instead of manually sorting vertices and adding them to the run manager, the function now calls the `prepare` method of the `Graph` class. This method validates the stream, builds edges, and sets the first layer of vertices. This change improves the functionality and organization of the codebase.
* feat: add BaseModel class with model_config attribute
A new `BaseModel` class has been added to the `base_model.py` file. This class extends the `PydanticBaseModel` and includes a `model_config` attribute of type `ConfigDict`. This change improves the codebase by providing a base model with a configuration dictionary for models.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: update langflow.graph.edge.schema.py
Refactor the `langflow.graph.edge.schema.py` file to include the `TargetHandle` and `SourceHandle` models. This change improves the clarity and consistency of the codebase.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: update build_custom_component_template to use add_name instead of keep_name
Refactor the `build_custom_component_template` function in `utils.py` to use the `add_name` parameter instead of the deprecated `keep_name` parameter. This change ensures consistency with the updated method signature and improves code clarity.
* feat(component.py): add method to set output types based on method return type to improve type checking and validation in custom components (#3115)
* feat(component.py): add method to set output types based on method return type to improve type checking and validation in custom components
* refactor: extract method to get method return type in CustomComponent
* refactor: update _extract_return_type method in CustomComponent to accept Any type
The _extract_return_type method in CustomComponent has been updated to accept the Any type as the return_type parameter. This change improves the flexibility and compatibility of the method, allowing it to handle a wider range of return types.
* refactor: add _template_config property to BaseComponent
Add a new `_template_config` property to the `BaseComponent` class in `base_component.py`. This property is used to store the template configuration for the custom component. If the `_template_config` property is empty, it is populated by calling the `build_template_config` method. This change improves the efficiency of accessing the template configuration and ensures that it is only built when needed.
* refactor: add type checking for Output types in add_types method
Improve type checking in the `add_types` method of the `Output` class in `base.py`. Check if the `type_` already exists in the `types` list before adding it. This change ensures that duplicate types are not added to the list.
* update starter projects
* refactor: optimize imports in base.py
Optimize imports in the `base.py` file by removing unused imports and organizing the remaining imports. This change improves code readability and reduces unnecessary clutter.
* fix(base.py): fix condition to check if self.types is not None before checking if type_ is in self.types
* refactor: update build_custom_component_template to use add_name instead of keep_name
* refactor(graph): update ContractEdge to use EdgeData for raw_edge parameter, enhancing type consistency across edges
* refactor(graph): update add_edge method to use EdgeData type, improving type safety and consistency in graph edges
* chore(dependencies): bump mypy version from 1.10.0 to 1.11.0 for improved type checking capabilities
* refactor: update Edge class to use EdgeData type for raw_edge parameter
The Edge class in base.py has been updated to use the EdgeData type for the raw_edge parameter in the __init__ method. This change improves type safety and consistency in graph edges.
* refactor: update follow_imports to "skip" in mypy configuration
* fix: add type ignore comment for return data in SelfQueryRetriever.py to resolve mypy warning
* chore: update mypy configuration to include namespace_packages and ignore missing imports in pyproject.toml files
* fix: add type ignore comment for target_param in base.py to resolve mypy warning about split method usage
* fix: add type ignore comments for various classes to resolve mypy warnings in input_mixin, database models, and cache service files
* refactor: add first layer attribute to Graph class
The Graph class in base.py has been updated to include a new attribute called `_first_layer`. This attribute is a list of strings and is initialized as an empty list. This change enhances the functionality of the Graph class by providing a way to store and access the first layer of vertices in the graph.
* refactor: store first layer in Graph class with _first_layer attribute for improved access to vertices being run
* fix: add type ignore comments to database model classes to resolve mypy type checking warnings
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* 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>
* 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
* feat(Makefile): add 'patch' target to bump the version in langflow and langflow-base
* chore: bump langflow and langflow-base versions to 1.0.13 and 0.0.89 respectively
chore: update dependencies in poetry.lock and pyproject.toml
Update the versions of various dependencies in the poetry.lock and pyproject.toml files to their latest versions. This ensures compatibility and incorporates bug fixes and improvements provided by the updated dependencies.
* fix: disable error code "type-var" in mypy configuration
* refactor(VertexAiModel.py): restructure the return statement to improve readability and maintainability by using type casting for LanguageModel
Update the langflow-base dependency in pyproject.toml to use the local path "./src/backend/base" with the "develop" flag. This change allows for easier development and testing of the langflow-base module.
* refactor: import nanoid only after setting up langwatch
* fix: update nanoid to version 2.0.0
* chore: Update langflow-base dependency to version 0.0.86
* feat: migrate bingsearch to Component syntax
* all
* fix style
* [autofix.ci] apply automated fixes
* feat: Update BingSearchAPI and WikipediaAPI components
Refactor the BingSearchAPI and WikipediaAPI components to improve code organization and readability. Migrate BingSearchAPI to Component syntax and make initialization separate from the constructor. Update the condition to run end_all_traces in the BingSearchAPIComponent. Also, update the WikipediaAPIComponent to use the WikipediaAPIWrapper with the specified parameters.
* update lock
---------
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 yfinance dependency to pyproject.toml
* feat: Add YFinanceTool component for interacting with Yahoo Finance News
* refactor: update YfinanceToolComponent to use type casting for Tool return value
* First implementation of LangWatch tracer
* Update to langwatch 0.1.4 to use root span for better control of the all-wrapping trace, workaround for llm not being used for an actual call and better ids on langwatch ui
* Remove dependency from backend base internal and add langwatch docs
* [autofix.ci] apply automated fixes
* Fix using session id for metadata, except if the same as flow_id
* Fix wrong error variable and support for python <3.10 is not necessary given langflow pyproject restrictions
* Bump langwatch to v0.1.4
* [autofix.ci] apply automated fixes
* Remove extra line the popped up
* Fix missing log parameter on method
* Fix mypy issues
* Bump langwatch to v0.1.7 to truncate large documents
* Move docs to the right folder
* chore: update lock
* chore: Update clarifai-grpc to version 10.6.4, cohere to version 5.6.1, langwatch to version 0.1.3, and litellm to version 1.41.23
---------
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 CrewAI icon component
This commit adds the CrewAI icon component to the project. The component is imported and used in the styleUtils file, allowing it to be used throughout the application. This addition enhances the visual representation of the CrewAI feature in the user interface.
* feat: Add CrewAI[tools] dependency to project
This commit adds the CrewAI dependency to the project by including it in the pyproject.toml file. The version specified is "^0.36.0" and the "tools" extras are included. This addition allows the project to utilize the features provided by CrewAI.
* fix: update crewai icon size
* feat: Add CrewAIAgent component
This commit adds the CrewAIAgent component to the project. The component represents an agent of CrewAI and includes various inputs and outputs for role, goal, backstory, tools, language model, memory, verbosity, and delegation. This addition enhances the functionality of the project by integrating with CrewAI and allows for more advanced agent-based interactions.
* feat: Add CrewAICrew component
This commit adds the CrewAICrew component to the project. The component represents a group of agents and defines how they should collaborate and the tasks they should perform. It includes various inputs and outputs for tasks, agents, topic, verbosity, memory, cache, max RPM, process, and more. This addition enhances the functionality of the project by integrating with CrewAI and allows for more advanced agent-based interactions.
* feat: Add CrewAITask component
This commit adds the CrewAITask component to the project. The component represents a task in CrewAI and includes inputs for description, expected output, tools, agent, and async execution. It also provides an output for the task itself. This addition enhances the functionality of the project by integrating with CrewAI and allows for the creation and execution of tasks within the system.
* refactor: Update build configuration in custom_component_update endpoint
This commit updates the build configuration in the custom_component_update endpoint of the endpoints.py file. The previous implementation was assigning the result of code_request.get_template() directly to the build_config parameter, which caused an issue. The updated code now assigns the result to the updated_build_config variable before passing it to the cc_instance.update_build_config() method. This change ensures that the correct build configuration is used and improves the functionality of the custom_component_update endpoint.
* feat: Add SequentialTask and HierarchicalTask classes
This commit adds the SequentialTask and HierarchicalTask classes to the tasks.py file in the base/agents/crewai directory. These classes represent different types of tasks in the CrewAI system. The SequentialTask class is used for sequential tasks, while the HierarchicalTask class is used for hierarchical tasks. This addition enhances the functionality of the project by providing the necessary classes for implementing different types of tasks in CrewAI.
* refactor: Update CrewAIAgentComponent class name
This commit updates the class name from "CrewAIAgent" to "CrewAIAgentComponent" in the CrewAIAgent.py file. The new name better reflects the nature of the class as a component and improves the clarity of the codebase.
* refactor: Update CrewAICrewSequential component
This commit adds the CrewAICrewSequential component to the project. The component represents a group of agents and defines how they should collaborate and the tasks they should perform in a sequential manner. It includes various inputs and outputs for tasks, verbosity, memory, cache, max RPM, and more. This addition enhances the functionality of the project by providing a specific component for sequential tasks in the CrewAI system.
* feat: Add CrewAICrewHierarchical component
This commit adds the CrewAICrewHierarchical component to the project. The component represents a group of agents and defines how they should collaborate and the tasks they should perform in a hierarchical manner. It includes various inputs and outputs for tasks, verbosity, memory, cache, max RPM, and more. This addition enhances the functionality of the project by providing a specific component for hierarchical tasks in the CrewAI system.
* refactor: Rename CrewAITask.py to CrewAITaskHierarchical.py
This commit renames the file "CrewAITask.py" to "CrewAITaskHierarchical.py" in the "helpers" directory of the "langflow/components/helpers" package. The new name better reflects the purpose of the file, which is to define the "CrewAITaskHierarchical" component. This change improves the clarity and organization of the codebase.
* feat: Add CrewAITaskSequential component
This commit adds the CrewAITaskSequential component to the project. The component represents a sequential task in CrewAI and includes inputs for task description, expected output, tools, agent, and async execution. It also provides an output for the task itself. This addition enhances the functionality of the project by integrating with CrewAI and allows for the creation and execution of sequential tasks within the system.
* feat: Add BaseCrewComponent class
This commit adds the BaseCrewComponent class to the project. The class represents a group of agents, defining how they should collaborate and the tasks they should perform. It includes various inputs and outputs for tasks, verbosity, memory, cache, max RPM, and more. This addition enhances the functionality of the project by providing a base component for creating and managing crews in the CrewAI system.
* refactor: Update display name of CrewAIAgentComponent to "CrewAI Agent"
* refactor: Remove CrewAICrewHierarchical component
This commit removes the CrewAICrewHierarchical component from the project. The component represented a group of agents and defined how they should collaborate and the tasks they should perform in a hierarchical manner. However, it is no longer needed and has been deemed unnecessary for the current project requirements. This removal streamlines the codebase and improves the clarity of the project.
* refactor: make Crew use BaseCrew class
* refactor: Replace CrewAICrewSequential with SequentialCrew
This commit replaces the deprecated CrewAICrewSequential component with the new SequentialCrew component. The SequentialCrew component represents a group of agents and defines how they should collaborate and the tasks they should perform in a sequential manner. This change improves the clarity and organization of the codebase by using a more descriptive and consistent naming convention for the component. It also aligns with the recent refactorings in the project, such as the removal of the CrewAICrewHierarchical component and the addition of the BaseCrewComponent class. Overall, this update enhances the functionality and maintainability of the project.
* refactor: Rename CrewAITaskHierarchical.py to HierarchicalTask.py
This commit renames the file "CrewAITaskHierarchical.py" to "HierarchicalTask.py" in the "helpers" directory of the "langflow/components/helpers" package. The new name better reflects the purpose of the file, which is to define the "HierarchicalTask" component. This change improves the clarity and organization of the codebase.
* refactor: Rename CrewAITaskSequential.py to SequentialTask.py
This commit renames the file "CrewAITaskSequential.py" to "SequentialTask.py" in the "helpers" directory of the "langflow/components/helpers" package. The new name better reflects the purpose of the file, which is to define the "SequentialTaskComponent" component. This change improves the clarity and organization of the codebase.
* style: reorder imports
* chore: update lock
* refactor: Refactor build_crew method in BaseCrewComponent
This commit refactors the build_crew method in the BaseCrewComponent class. The method was previously taking tasks and agents as arguments, but it was not using them correctly. This update removes the unnecessary arguments and fixes the method to correctly build a Crew object. This refactor improves the clarity and functionality of the codebase.
* refactor: Update status assignment in CrewAIAgentComponent
This commit updates the status assignment in the CrewAIAgentComponent class. Previously, the status was set using the `model_dump()` method of the agent, but it has been changed to use the `repr()` method instead. This change improves the clarity and consistency of the codebase.
* refactor: Add agents input to HierarchicalCrewComponent
This commit adds the "agents" input to the HierarchicalCrewComponent class in the "HierarchicalCrew.py" file. The "agents" input is a list of "Agent" objects and allows for better management and collaboration between agents within the crew. This addition enhances the functionality and flexibility of the HierarchicalCrewComponent, improving the overall codebase.
* refactor: Fix post_process_raw function in artifact.py
This commit fixes the post_process_raw function in the artifact.py file. Previously, the function was not correctly handling the case when the raw data was a BaseModel or a dictionary. This update ensures that the raw data is properly encoded using jsonable_encoder and updates the artifact_type accordingly. This fix improves the functionality and reliability of the codebase.
* refactor: Update CustomComponent's repr_value handling
This commit updates the repr_value handling in the CustomComponent class. Previously, the repr_value was being modified directly within the class, which could lead to unexpected behavior. This update ensures that the repr_value is returned instead of modifying it directly. Additionally, it adds proper handling for different types of repr_value, such as dictionaries and BaseModel objects. This refactor improves the clarity and maintainability of the codebase.
* update lock
* refactor: Add task input to SequentialTaskComponent
This commit adds the "task" input to the SequentialTaskComponent class in the "SequentialTask.py" file. The "task" input is a SequentialTask object that will perform the task. This addition enhances the functionality and flexibility of the SequentialTaskComponent, improving the overall codebase.
* refactor: Change log level of file retrieval message in LocalStorageService
* refactor(crew.py): update import statement to include InputTypes from langflow.inputs.inputs module to enhance code readability and maintainability
* chore: Update cachetools dependency to version 5.4.0
* feat(crew.py): add new methods get_task_callback and get_step_callback to handle task and step callbacks respectively
* refactor: Add allow_code_execution input to CrewAIAgentComponent
This commit adds the "allow_code_execution" input to the CrewAIAgentComponent class in the "CrewAIAgent.py" file. The "allow_code_execution" input is a boolean value that determines whether the agent is allowed to execute code. This addition enhances the functionality and flexibility of the CrewAIAgentComponent, improving the overall codebase.
* Add step_callback and task_callback inputs to HierarchicalCrewComponent and SequentialCrewComponent
* style(SequentialTask.py): remove unnecessary 'required' attribute from input definition in SequentialTaskComponent class
* chore: fix lint issues