The base class "Serializable" has been renamed to "BaseLLM" to provide a more descriptive and consistent name for the class. This change improves clarity and maintainability of the code.
🐛 fix(codeAreaComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(dropdownComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(floatComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(inputFileComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(inputListComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(intComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(promptComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(textAreaComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(ui/accordion.tsx): fix formatting and add missing semicolons to improve code readability and maintainability
The changes were made to fix formatting issues and add missing semicolons in the code. This improves code readability and maintainability, making it easier for developers to understand and work with the code.
🐛 fix(constants.tsx): fix formatting and indentation issues in the buildTweakObject function
🐛 fix(popUpContext.tsx): remove unnecessary empty line
🐛 fix(tabsContext.tsx): remove unnecessary empty line
🐛 fix(ApiModal/index.tsx): fix formatting and indentation issues
🐛 fix(codeAreaModal/index.tsx): fix formatting and indentation issues
🐛 fix(types/components/index.ts): remove unnecessary empty line
The changes in constants.tsx fix formatting and indentation issues in the buildTweakObject function to improve code readability. The changes in popUpContext.tsx, tabsContext.tsx, ApiModal/index.tsx, codeAreaModal/index.tsx, and types/components/index.ts fix formatting and indentation issues to ensure consistent code style.
🐛 fix(base.py): add optional 'name' parameter to the format method in FieldFormatter
In loading.py, the error message when failing to build a connection to the database is now formatted in a more readable way. This improves the clarity of the error message and makes it easier to identify the cause of the issue.
In base.py, the format method in FieldFormatter now accepts an optional 'name' parameter. This allows for more flexibility when formatting the field and provides the ability to include the field name in the formatting process if needed.
The color code for the "retrievers" category in the nodeColors object has been updated from "#F5B85A" to "#e6b25a". This change was made to ensure consistency and improve the visual representation of the "retrievers" category.
The ConversationEntityMemory integration is now documented in the config.yaml file. This provides a link to the documentation for using the ConversationEntityMemory module with SQLite as the underlying storage. This change improves the clarity and accessibility of the documentation for this integration.
🐛 fix(constants.tsx): refactor getCurlCode and getPythonCode to use buildTweakObject function for generating tweak object
🐛 fix(ApiModal): update logic for opening accordions based on tweak.current length and closeEdit value
🔒 chore(poetry.lock): update joblib version to 1.3.1
The versions of the anthropic, google-api-python-client, and joblib packages have been updated to their latest versions. This ensures that the application is using the most recent bug fixes, improvements, and features provided by these packages.
The code now catches an additional exception when the object does not have a 'conn' field. This improves the error handling by providing a more specific error message when building a connection to the database fails.
The 'from_method_nodes' dictionary in the 'MemoryCreator' class in 'base.py' has been updated to include the 'SQLiteEntityStore' class and its '__init__' method. This change allows the 'SQLiteEntityStore' class to be used as a memory node in the LangFlow application.
✨ feat(memories.py): add show attribute to entity_store field in MemoryFrontendNode class
The condition to add extra fields in the MemoryFrontendNode class has been fixed to correctly check if any of the base classes are in a list of base message classes. Additionally, the show attribute has been added to the entity_store field in the MemoryFrontendNode class to control its visibility.
The "kwargs" and "args" parameters are now excluded from the generated template dictionary. This ensures that only the relevant parameters are included in the template, improving the accuracy and usefulness of the generated template.
When processing the data graph, if the langchain_object is of an unknown type, a ValueError is now raised. This provides better error handling and helps identify any unexpected langchain_object types that may be encountered during processing.
✨ feat(base.py): add support for creating MemoryFrontendNode from a specific method in ZepChatMessageHistory class
The `MemoryCreator` class now supports creating `MemoryFrontendNode` from a specific method in the `ZepChatMessageHistory` class. This is achieved by adding the `from_method_nodes` dictionary with the method name as the key and the class name as the value. The `build_template_from_method` function is used to create the `MemoryFrontendNode` from the specified method. This enhancement allows for more flexibility in creating `MemoryFrontendNode` instances.
✨ feat(base.py): add support for ZepRetriever in from_method_nodes dictionary
The build_template_from_method call for the MultiQueryRetriever in the get_signature method was using the incorrect method name "from_llm". It has been fixed to use the correct method name "from_method_nodes". Additionally, support for the ZepRetriever has been added to the from_method_nodes dictionary to allow for its usage in the RetrieverCreator class.
The 'url' field in the MemoryFrontendNode class is now set to be shown in the frontend. This change allows the 'url' field to be visible and accessible to users in the frontend interface.
The "self" parameter is now excluded from the template building process. This change improves the accuracy of the generated template by removing unnecessary information.
The unused integrations in the memories and retrievers sections have been commented out to improve code readability and remove unnecessary clutter. These integrations are not currently being used in the application and can be safely ignored.
The instantiate_memory function now includes error handling for a specific AttributeError that occurs when the object does not have a 'cursor' attribute. If this error occurs, an AttributeError is raised with a specific error message indicating a failure to build a connection to the database. This change improves the error handling and provides more informative error messages for debugging purposes.
🐛 fix(base.py): call the method to remove unwanted base classes before converting the frontend node to a dict
The `process_base_classes` method is added to the `FrontendNode` class to remove unwanted base classes from the list of base classes. This method iterates over the base classes and filters out any classes that are present in the `CLASSES_TO_REMOVE` list. The method is then called before converting the frontend node to a dictionary representation in the `to_dict` method to ensure that the unwanted base classes are not included in the final output.
The `add_extra_base_classes` method is added to the `LLMFrontendNode` class. This method checks if the "BaseLLM" class is already present in the `base_classes` list and appends it if not. This change allows for easier extensibility by providing a way to add additional base classes to the `LLMFrontendNode` class.
The `from_method_nodes` dictionary is added to the `RetrieverCreator` class in order to map the "MultiQueryRetriever" node to the "from_llm" method. This refactor improves the readability and maintainability of the code by explicitly defining the mapping between nodes and methods.
🚀 feat(loading.py): implement the ability to instantiate retrievers based on node type and class object
The `instantiate_based_on_type` function now includes a new condition to handle the instantiation of retrievers. The `instantiate_retriever` function is introduced to handle the specific logic for creating retrievers. This change allows for the dynamic creation of retrievers based on the provided node type and class object.
✨ feat(utils.py): add support for importing retriever module based on retriever name
The `import_retriever` function is added to the `utils.py` module to allow importing the retriever module based on the retriever name. This function uses the `import_module` function from the `importlib` module to dynamically import the retriever module from the `langchain.retrievers` package. This enhances the modularity and extensibility of the codebase by providing a convenient way to import retrievers based on their names.
The RetrieverVertex class is added to the list of available vertex types in the langflow.graph.vertex.types module. This allows for the creation of vertices that represent retrievers in the graph.
The import statements for vertex types in the constants.py file have been refactored to import from langflow.graph.vertex.types as types. This change improves the readability and maintainability of the code by making it clear where the vertex types are coming from.
🐛 fix(chat.py): fix incorrect key used to retrieve graph_data from flow_data_store
The BuildStatus.IN_PROGRESS constant is changed to BuildStatus.STARTED to provide a more accurate representation of the flow status. Additionally, the incorrect key "data" is replaced with "graph_data" when retrieving the graph data from the flow_data_store dictionary.
✨ feat(AccordionComponent): add support for multiple open accordions by changing the open prop from boolean to string array
🐛 fix(constants.tsx): remove escape characters from the JSON stringified tweaks to fix parsing issues
✨ feat(constants.tsx): add support for tweaks dictionary in the getCurlCode and getPythonCode functions
🐛 fix(ApiModal): fix the logic to set the initial value of the openAccordion state based on the getTweak array
✨ feat(ApiModal): add support for opening accordions based on the getTweak array when switching to the Tweak tab
🐛 fix(ApiModal): fix the logic to filter and remove empty tweaks from the tweak.current array
✨ feat(ApiModal): add support for adding new tweaks to the tweak.current array and generating Python API code
🐛 fix(ApiModal): fix the logic to get the value of a specific tweak template based on the node id and template name
✨ feat(ApiModal): add support for opening accordions based on the tweak.current array when switching to the Tweak tab
🐛 fix(types): add missing newline at the end of the file
✨ feat(chatMessage): improve rendering of multi-line messages
The `convert` variable is now imported before being used to convert ANSI to HTML. Additionally, the `DOMPurify` library is imported and used to sanitize the HTML content before rendering it, preventing potential XSS attacks. The rendering of multi-line messages has been improved by splitting the message by newline characters and rendering each line separately with a line break.
The dompurify package is added as a dependency to the frontend package.json file. This package is needed for sanitizing HTML to prevent cross-site scripting (XSS) attacks.
The Search icon has been renamed to FileSearch to provide a more accurate representation of its purpose. This change improves clarity and ensures that the icon name aligns with its actual functionality.
🐛 fix(util.py): handle non-string types in format_dict function
The base retriever class is added to provide a common interface for all retrievers in the language chain. The frontend node class for retrievers is also added to handle the formatting of fields specific to retrievers.
In the util.py file, a fix is made to handle non-string types in the format_dict function. Previously, if the type of a field was not a string, an error would occur. This fix ensures that the type is converted to a string before further processing.
The __init__.py file is added to the retrievers directory to make it a Python package. This allows the directory to be recognized as a module and enables importing of modules and submodules within the retrievers directory.
The type dictionary in the listing.py file now includes a "retrievers" key, which contains a list of retriever creators. This allows for the inclusion of retrievers as a supported type in the application.
🔀 refactor(types.py): add langchain_types_dict as a separate variable to improve code readability and maintainability
The import statement in `endpoints.py` has been updated to import `langchain_types_dict` instead of `build_langchain_types_dict` for consistency with the variable name. This change improves code readability and maintainability.
In `types.py`, a new variable `langchain_types_dict` has been added as a separate variable to store the result of `build_langchain_types_dict()`. This change improves code readability and makes it easier to understand the purpose of the variable.
🔧 chore(settings.py): add retrievers attribute to Settings class
The config.yaml file now includes a documentation link for the MultiQueryRetriever in the retrievers section. This link provides additional information on how to use the MultiQueryRetriever. In the settings.py file, the Settings class now includes a retrievers attribute to store retriever-related settings. This allows for easier management and configuration of retrievers in the application.
💄 style(NodeModal): remove unused import and variable to clean up code
The import and variable name for `nodeIconsLucide` has been updated to improve code readability. The unused import and variable `nodeIcons` and `toNormalCase` have been removed to clean up the code.
🎨 style(utils.ts): reorganize nodeColors and nodeNames objects to improve readability and maintainability
The changes in this commit remove unused imports and icons from the `utils.ts` file, which helps improve code cleanliness and reduces the bundle size. Additionally, the `nodeColors` and `nodeNames` objects have been reorganized to improve readability and maintainability.
💡 refactor(base.py): The field formatting logic in the FrontendNode class has been refactored into a separate class called FieldFormatters. This improves code organization and separation of concerns, making it easier to maintain and extend the field formatting functionality in the future.
The trailing whitespace has been removed for consistency and readability. The unused import of `DEFAULT_CONNECTION_STRING` from `langchain.memory.chat_message_histories.postgres` has been removed. The `PostgresChatMessageHistoryFrontendNode` now has a default value for the `connection_string` field, which is set to `DEFAULT_CONNECTION_STRING`. This ensures that the field has a default value when creating instances of the class.
🔧 chore(memories.py): remove trailing whitespace and unused import
🔧 refactor(field_formatters.py): refactor field formatters for template frontend_node
The commit adds a new file `field_formatters.py` to the `frontend_node/formatter` directory in the `langflow/template` backend. This file contains multiple field formatters for the template frontend_node. The formatters handle various formatting tasks such as formatting field names, setting field options, handling special fields, and formatting field types. The commit aims to improve the code organization and maintainability by separating the field formatting logic into dedicated formatters.
The base.py file is a new addition to the project. It introduces the FieldFormatter class, which is an abstract base class (ABC) for formatting template fields. This class provides a format() method that takes a TemplateField object as input and is meant to be implemented by subclasses. This addition allows for the creation of custom field formatters in the project.
The "RetrievalQA" memory field in the template frontend node is updated to have the "show" and "required" properties set to False. This change is made to hide the memory field and make it optional. Additionally, the "advanced" property is set to False for all fields, and the "password" property is set to False for fields containing the word "key" in their name.
⬆️ feat(pyproject.toml): update beautifulsoup4 to version 4.12.2
⬆️ feat(pyproject.toml): update langchain to version 0.0.219
⬆️ feat(pyproject.toml): update pandas to version 2.0.0
⬆️ feat(pyproject.toml): update huggingface-hub to version 0.15.0
⬆️ feat(pyproject.toml): update unstructured to version 0.7.0
⬆️ feat(pyproject.toml): update pypdf to version 3.11.0
⬆️ feat(pyproject.toml): update langchain-serve to version >0.0.47
⬆️ feat(pyproject.toml): update qdrant-client to version 1.3.0
⬆️ feat(pyproject.toml): update ctransformers to version 0.2.10
⬆️ feat(pyproject.toml): update cohere to version 4.11.0
⬆️ feat(pyproject.toml): update anthropic to version 0.3.0
⬆️ feat(pyproject.toml): update types-pyyaml to version 6.0.12.8
The dependencies in the pyproject.toml file have been updated to their latest versions. These updates include various bug fixes, performance improvements, and new features. It is important to keep the dependencies up to date to ensure compatibility and take advantage of the latest enhancements and fixes provided by the library maintainers.