Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add possibility to initialize the Graph with components #3134

Merged
merged 118 commits into from
Aug 5, 2024

Commits on Jul 31, 2024

  1. Configuration menu
    Copy the full SHA
    58c4369 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f96feb View commit details
    Browse the repository at this point in the history
  3. refactor: update Component constructor to pass config params with und…

    …erscore
    
    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>
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    290f685 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ca1aa32 View commit details
    Browse the repository at this point in the history
  5. 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>
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    81391c5 View commit details
    Browse the repository at this point in the history
  6. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    6d01eda View commit details
    Browse the repository at this point in the history
  7. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    49349ff View commit details
    Browse the repository at this point in the history
  8. fix(custom_component.py): convert _user_id to string before passing t…

    …o functions to ensure compatibility with function signatures
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    1e2f517 View commit details
    Browse the repository at this point in the history
  9. feat(component.py): add method to set output types based on method re…

    …turn type to improve type checking and validation in custom components
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    fde9687 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7f679a4 View commit details
    Browse the repository at this point in the history
  11. 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
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    485e5e2 View commit details
    Browse the repository at this point in the history
  12. refactor(utils.py, base.py): change parameter name 'add_name' to 'kee…

    …p_name' for clarity and consistency in codebase
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    2c389dc View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5325541 View commit details
    Browse the repository at this point in the history
  14. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    4a455db View commit details
    Browse the repository at this point in the history
  15. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    86bba19 View commit details
    Browse the repository at this point in the history
  16. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    d495989 View commit details
    Browse the repository at this point in the history
  17. refactor(inputs): update field_type declarations in various input cla…

    …sses to use SerializableFieldTypes enum for better type safety and clarity
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    da58892 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    62c9ec4 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1d6491a View commit details
    Browse the repository at this point in the history
  20. refactor(inputs): update model_config in BaseInputMixin to enable pop…

    …ulating 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    5657101 View commit details
    Browse the repository at this point in the history
  21. refactor: update _extract_return_type method in CustomComponent to ac…

    …cept 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    1fe8126 View commit details
    Browse the repository at this point in the history
  22. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    5ce27d2 View commit details
    Browse the repository at this point in the history
  23. refactor(vertex): add get_input and get_output methods for easier acc…

    …ess to input and output values
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    aab3fd6 View commit details
    Browse the repository at this point in the history
  24. refactor(component): add set_output_value method for easier modificat…

    …ion 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    62acf55 View commit details
    Browse the repository at this point in the history
  25. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    efd1592 View commit details
    Browse the repository at this point in the history
  26. refactor(component): add _edges attribute to Component class for mana…

    …ging 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    fc54f35 View commit details
    Browse the repository at this point in the history
  27. fix(component.py): fix conditional statement to check if self._vertex…

    … is not None before accessing its attributes
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    1954edf View commit details
    Browse the repository at this point in the history
  28. refactor(component): add _get_fallback_input method for handling fall…

    …back 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    25b4dc5 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    213a803 View commit details
    Browse the repository at this point in the history
  30. refactor(component): add _map_parameters_on_frontend_node and _map_pa…

    …rameters_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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    5ab8fed View commit details
    Browse the repository at this point in the history
  31. refactor(component): Add map_inputs and map_outputs methods for mappi…

    …ng 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    ea8ac9f View commit details
    Browse the repository at this point in the history
  32. refactor(component): Add Input, Output, and ComponentFrontendNode imp…

    …orts 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    13c63f0 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    564af7e View commit details
    Browse the repository at this point in the history
  34. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    f324199 View commit details
    Browse the repository at this point in the history
  35. refactor(frontend_node): Add set_field_value_in_template method for u…

    …pdating 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    e082ce6 View commit details
    Browse the repository at this point in the history
  36. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    8108555 View commit details
    Browse the repository at this point in the history
  37. feat: Add Template.from_dict method for creating Template objects fro…

    …m 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    3d76d6c View commit details
    Browse the repository at this point in the history
  38. refactor(frontend_node): Add from_dict method for creating FrontendNo…

    …de objects from dictionaries
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    2452935 View commit details
    Browse the repository at this point in the history
  39. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    6ab4c35 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    f5d5ee8 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    64d6190 View commit details
    Browse the repository at this point in the history
  42. refactor(graph): Add EdgeData import and update add_nodes_and_edges m…

    …ethod 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    f1e03fa View commit details
    Browse the repository at this point in the history
  43. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    939ae63 View commit details
    Browse the repository at this point in the history
  44. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    91276c6 View commit details
    Browse the repository at this point in the history
  45. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    805f9fe View commit details
    Browse the repository at this point in the history
  46. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    b706aea View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    4b04dd7 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    2d9a641 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    edbbad1 View commit details
    Browse the repository at this point in the history
  50. refactor(graph): Update Edge and ContractEdge constructors to use Edg…

    …eData type
    
    The constructors of the `Edge` and `ContractEdge` classes in `base.py` have been updated to use the `EdgeData` type for the `edge` and `raw_edge` parameters, respectively. This change improves the type safety and clarity of the codebase.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    92da504 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    97f14ef View commit details
    Browse the repository at this point in the history
  52. 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>
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    397893c View commit details
    Browse the repository at this point in the history
  53. 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>
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    b59a6cc View commit details
    Browse the repository at this point in the history
  54. refactor(base): Update target_param assignment in Edge class

    The `target_param` assignment in the `Edge` class of `base.py` has been updated to use the `cast` function for type hinting. This change improves the type safety and clarity of the codebase.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    4b33c21 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    0de9b8b View commit details
    Browse the repository at this point in the history
  56. refactor: update build_custom_component_template to use add_name inst…

    …ead 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    8cc7700 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    c4de2b7 View commit details
    Browse the repository at this point in the history
  58. feat(component.py): add method to set output types based on method re…

    …turn 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.
    ogabrielluiz authored Jul 31, 2024
    Configuration menu
    Copy the full SHA
    a88ff42 View commit details
    Browse the repository at this point in the history
  59. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    a8c3564 View commit details
    Browse the repository at this point in the history
  60. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    1ed4812 View commit details
    Browse the repository at this point in the history
  61. update starter projects

    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    7acc1dd View commit details
    Browse the repository at this point in the history
  62. 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.
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    4be549f View commit details
    Browse the repository at this point in the history
  63. fix(base.py): fix condition to check if self.types is not None before…

    … checking if type_ is in self.types
    ogabrielluiz committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    61bdbb1 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    06ea280 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    f9deeb6 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    e43ead1 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    cb4bb93 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    e9f082c View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    a235083 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    d3a3271 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    75f6a56 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    3201ce2 View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    3aa7d0d View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    ddd872e View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    dca6a8a View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. refactor(prompts): Update PromptComponent to support custom fields an…

    …d template updates
    
    The `PromptComponent` class in `Prompt.py` has been updated to support custom fields and template updates. The `_update_template` method has been added to update the prompt template with custom fields. The `post_code_processing` method has been modified to update the template and improve backwards compatibility. The `_get_fallback_input` method has been added to provide a default prompt field. These changes improve the functionality and flexibility of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    941bcc4 View commit details
    Browse the repository at this point in the history
  2. refactor(base): Add DefaultPromptField to langflow.io

    The `DefaultPromptField` class has been added to the `langflow.io` module. This class provides a default prompt field for the `TableInput` class. This change improves the functionality and flexibility of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    9648ee4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64573c9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    79ec97e View commit details
    Browse the repository at this point in the history
  5. refactor(base): Update langflow.components.__init__.py to import the …

    …prompts module
    
    This change adds the prompts module to the list of imports in the __init__.py file of the langflow.components package. This ensures that the prompts module is available for use in the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    846ba0e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    051a4c3 View commit details
    Browse the repository at this point in the history
  7. refactor(graph): Update VertexTypesDict to import vertex types lazily

    The VertexTypesDict class in constants.py has been updated to import vertex types lazily. This change improves the performance of the codebase by deferring the import until it is actually needed.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    4a97dcc View commit details
    Browse the repository at this point in the history
  8. refactor(graph): Add missing attributes and lock to Graph class

    The Graph class in base.py has been updated to add missing attributes and a lock. This change ensures that the necessary attributes are initialized and provides thread safety with the addition of a lock. It improves the functionality and reliability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    252ca15 View commit details
    Browse the repository at this point in the history
  9. refactor(graph): Add method to set inputs in Graph class

    The `_set_inputs` method has been added to the Graph class in base.py. This method allows for setting inputs for specific vertices based on input components, inputs, and input type. It improves the functionality and flexibility of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    306ee86 View commit details
    Browse the repository at this point in the history
  10. refactor(graph): Set inputs for specific vertices in Graph class

    The `_set_inputs` method has been added to the Graph class in base.py. This method allows for setting inputs for specific vertices based on input components, inputs, and input type. It improves the functionality and flexibility of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    23d1546 View commit details
    Browse the repository at this point in the history
  11. refactor(graph): Update Graph class to set cache using flow_id

    The `Graph` class in `base.py` has been updated to set the cache using the `flow_id` attribute. This change ensures that the cache is properly set when `cache` is enabled and `flow_id` is not None. It improves the functionality and reliability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    d191d1c View commit details
    Browse the repository at this point in the history
  12. refactor(graph): Refactor Graph class to improve edge building

    The `Graph` class in `base.py` has been refactored to improve the process of building edges. The `build_edge` method has been added to encapsulate the logic of creating a `ContractEdge` object from the given `EdgeData`. This change enhances the readability and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    4d34a89 View commit details
    Browse the repository at this point in the history
  13. refactor(graph): Update _create_vertex method parameter name for clarity

    The `_create_vertex` method in the `Graph` class of `base.py` has been updated to change the parameter name from `vertex` to `frontend_data` for improved clarity. This change enhances the readability and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    e0e4625 View commit details
    Browse the repository at this point in the history
  14. refactor(graph): Update Graph class to return first layer in sort_int…

    …erface_components_first
    
    The `sort_interface_components_first` method in the `Graph` class of `base.py` has been updated to return just the first layer of vertices. This change improves the functionality of the codebase by providing a more focused and efficient sorting mechanism.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    46cd367 View commit details
    Browse the repository at this point in the history
  15. refactor(graph): Update Graph class to use get_vertex method for buil…

    …ding vertices
    
    The _build_vertices method in the Graph class of base.py has been updated to use the get_vertex method instead of creating a new vertex instance. This change improves the efficiency and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    1b900b2 View commit details
    Browse the repository at this point in the history
  16. refactor(graph): Update Graph class to use astep method for asynchron…

    …ous execution
    
    The `Graph` class in `base.py` has been updated to use the `astep` method for asynchronous execution of vertices. This change improves the efficiency and maintainability of the codebase by leveraging asyncio and allowing for concurrent execution of vertices.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    9017a81 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c901a21 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    cd8dd2c View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    2514401 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    bad3cbe View commit details
    Browse the repository at this point in the history
  21. refactor(base.py): Update Vertex class to handle parameter dictionari…

    …es in build_params
    
    The `build_params` method in the `Vertex` class of `base.py` has been updated to handle parameter dictionaries correctly. If the `param_dict` is empty or has more than one key, the method now sets the parameter value to the vertex that is the source of the edge. Otherwise, it sets the parameter value to a dictionary with keys corresponding to the keys in the `param_dict` and values as the vertex that is the source of the edge. This change improves the functionality and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    2424bdc View commit details
    Browse the repository at this point in the history
  22. refactor(base.py): Add methods to set input values and add component …

    …instances in Vertex class
    
    The `Vertex` class in `base.py` has been refactored to include two new methods: `set_input_value` and `add_component_instance`. The `set_input_value` method allows setting input values for a vertex by name, while the `add_component_instance` method adds a component instance to the vertex. These changes enhance the functionality and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    fbe5f3f View commit details
    Browse the repository at this point in the history
  23. refactor(message.py): Update _timestamp_to_str to handle datetime or …

    …str input
    
    The `_timestamp_to_str` function in `message.py` has been updated to handle both `datetime` and `str` input. If the input is a `datetime` object, it will be formatted as a string using the "%Y-%m-%d %H:%M:%S" format. If the input is already a string, it will be returned as is. This change improves the flexibility and usability of the function.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    800c759 View commit details
    Browse the repository at this point in the history
  24. refactor(test_base.py): Add unit tests for Graph class

    Unit tests have been added to the `test_base.py` file to test the functionality of the `Graph` class. These tests ensure that the graph is prepared correctly, components are added and connected properly, and the graph executes as expected. This change improves the reliability and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    c97b8c7 View commit details
    Browse the repository at this point in the history
  25. refactor(initialize/loading.py): Refactor get_instance_results function

    The `get_instance_results` function in `initialize/loading.py` has been refactored to simplify the logic for building custom components and components. The previous implementation had separate checks for `CustomComponent` and `Component` types, but the refactored version combines these checks into a single condition based on the `base_type` parameter. This change improves the readability and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    a08cfdd View commit details
    Browse the repository at this point in the history
  26. refactor(component.py): Add set_input_value method to Component class

    The `set_input_value` method has been added to the `Component` class in `component.py`. This method allows setting the value of an input by name, and also updates the `load_from_db` attribute if applicable. This change enhances the functionality and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    73a1d25 View commit details
    Browse the repository at this point in the history
  27. refactor(component.py): Set input value in _set_parameter_or_attribut…

    …e method
    
    The `_set_parameter_or_attribute` method in the `Component` class now sets the input value using the `set_input_value` method. This change improves the clarity and consistency of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    cc23367 View commit details
    Browse the repository at this point in the history
  28. refactor(inputs.py): Improve error message for invalid value type

    The `SecretStrInput` class in `inputs.py` has been updated to improve the error message when an invalid value type is encountered. Instead of a generic error message, the new message includes the specific value type and the name of the input. This change enhances the clarity and usability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    9b5a761 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    7a002a4 View commit details
    Browse the repository at this point in the history
  30. refactor(base.py): Update __repr__ method in ContractEdge class

    The `__repr__` method in the `ContractEdge` class of `base.py` has been updated to include the source handle and target handle information when available. This change improves the readability and clarity of the representation of the edge in the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    b821b22 View commit details
    Browse the repository at this point in the history
  31. refactor(component.py): Update set method to return self

    The `set` method in the `Component` class of `component.py` has been updated to return `self` after processing the connection or parameter. This change improves the chaining capability of the method and enhances the readability and consistency of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    0f873ac View commit details
    Browse the repository at this point in the history
  32. refactor(starter_projects): Add unit test for vector store RAG

    A unit test has been added to the `test_vector_store_rag.py` file in the `starter_projects` directory. This test ensures that the vector store RAG graph is set up correctly and produces the expected results. This change improves the reliability and maintainability of the codebase.
    ogabrielluiz committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    32452d0 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Configuration menu
    Copy the full SHA
    6467dfa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    39eae1b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a21dac2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7b6b629 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1bebf86 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3bd2b43 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8691588 View commit details
    Browse the repository at this point in the history
  8. refactor: update input tests to include 'name' field in all input typ…

    …es for better validation and clarity
    ogabrielluiz committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    b131d69 View commit details
    Browse the repository at this point in the history
  9. refactor: enhance Component class with methods to validate callable o…

    …utputs and inheritance checks for better robustness
    ogabrielluiz committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    75b2a67 View commit details
    Browse the repository at this point in the history
  10. refactor: disable load_from_db for inputs in Component class to impro…

    …ve input handling logic and prevent unwanted database loading
    ogabrielluiz committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    73e02fc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5a7e46f View commit details
    Browse the repository at this point in the history