🎨 style(GenericNode): change nodeIcons import to nodeIconsLucide to
match the new icon library
🎨 style(NodeModal): change Icon type to any to fix type error
🎨 style(chatInput): remove unnecessary array brackets
🎨 style(DisclosureComponent): change Icon size to 22 to match the new
icon library
🎨 style(extraSidebarComponent): change nodeIcons import to
nodeIconsLucide to match the new icon library and add Search icon
🎨 style(components/index): add SVGProps to import and change Icon type
to any to fix type error
✨ feat(utils.ts): add support for Lucide icons to be used in the app to
improve UI and UX.
feat(tabsContext.tsx): add support for display_name property in node templates to allow custom node names
fix(tabsContext.tsx): add null checks to prevent errors when processing flow edges and nodes
refactor(typesContext/index.ts): change template object type to APIClassType to match usage in tabsContext
The SlackDirectoryLoader is added to the list of document loaders in the DocumentLoaderFrontNode class. This allows users to load zip files from Slack into the application.
feat(frontend): add save function to TabsContext to enable saving of changes made to tabs
fix(frontend): add save function to TabsContext in ParameterComponent to enable saving of changes made to tabs
This commit updates the langchain dependency from version 0.0.209 to version 0.0.211. This is a minor version update that includes bug fixes and performance improvements.
The GitLoader template now has four new fields: repo_path, clone_url, branch, and file_filter. These fields allow the user to specify the repository path, clone URL, branch, and file extensions to be loaded. This improves the flexibility of the GitLoader template and allows it to be used in a wider range of scenarios. Additionally, a minor change was made to the add_extra_fields method to ensure that the field.show attribute is set to True for all fields.
The `instantiate_documentloader` function now supports filtering files by extension using a `file_filter` parameter. The parameter is a string of comma-separated extensions, and the function now converts it into a lambda function that filters files based on whether their name contains any of the specified extensions. This improves the flexibility of the document loader by allowing it to load only specific types of files.
The fields in the Template class were previously sorted by DIRECT_TYPES, which caused issues when fields had the same field_type. Sorting alphabetically first ensures that fields are sorted in a consistent manner before sorting by DIRECT_TYPES.
The SlackSVG component was renamed to MongoDBSVG to better reflect the actual icon being used. This improves the naming consistency and makes the code more readable.
The `instantiate_vectorstore` function now uses a dictionary to initialize vector stores instead of a series of if-else statements. This improves the readability and maintainability of the code. A new dictionary `vecstore_initializer` is added to `vector_store.py` to map the class names of vector stores to their respective initialization functions.
The certifi package is added to the dev dependencies to ensure that the package is available during development. This package provides Mozilla's carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while making HTTPS requests.
The `instantiate_vectorstore` function now supports the `MongoDBAtlasVectorSearch` vector store. This allows for the use of MongoDB Atlas as a vector store for Langflow. The `search_kwargs` parameter is now supported for all vector stores that have a `as_retriever` method. This allows for the configuration of the vector store's search parameters.
The hardcoded values for db_name, collection_name, and index_name have been removed from the initialize_mongodb function and are now required parameters. This makes the function more flexible and allows it to be used with different databases and collections. The support for the index_name parameter has been added to the MongoDBAtlasVectorSearch template in vectorstores.py, which allows the user to specify the name of the index to be used in the search.
🐛 fix(vector_store.py): remove hardcoded values for db_name, collection_name, and index_name and make them required parameters
The MongoDBIcon component was added to the frontend app to be used as an icon for MongoDB Atlas Vector Search. The icon was added as an SVG file and imported as a React component. The component was then added to the nodeIcons object in the utils.ts file.
✨ feat(langflow): add support for search_kwargs field in VectorStoreFrontendNode
The changes add support for MongoDB Atlas Vector Search in the vectorstores. The `MongoDBAtlasVectorSearch` class is now imported and initialized in `vector_store.py`. The `initialize_mongodb` function is added to initialize the MongoDB Atlas Vector Search class. The `VectorStoreFrontendNode` class is updated to add the `mongodb_atlas_cluster_uri`, `collection_name`, and `db_name` fields. The `search_kwargs` field is also added to the `VectorStoreFrontendNode` class to allow users to pass additional search parameters to the vector store.
The type hinting for allowed_tools variable is unnecessary as it is already defined in the previous line. Removing the type hinting improves the readability of the code.
The ternary operator in the validateNode function was simplified by removing the unnecessary if statement. The code is now more concise and easier to read.
The test now includes an assertion to check if the result of the function call is not None. This ensures that the function is returning a value and that the test is checking the correct output.
Added assertions to test_build_template_from_function to ensure that the returned result is not None and that the expected keys are present in the result. This improves the reliability of the test and ensures that the function is working as expected.
🔨 refactor(utils.ts): simplify getConnectedNodes function
🔨 refactor(utils.ts): remove unused variable in groupByFamily function
The snakeToSpaces function has been simplified by removing the unnecessary variable declaration. The getConnectedNodes function has been simplified by removing the unnecessary variable declaration and returning the result directly. The groupedObj variable in the groupByFamily function is no longer used, so it has been removed.
The display name for the SupabaseVectorStore is now set to "Supabase". This improves the user experience by providing a more descriptive name for the vector store.
The test_build_params function was failing when the root node was None. This commit adds an assertion to check if the root node is not None before proceeding with the other assertions.
The default value for the OpenAI model in the chat field has been updated to "gpt-3.5-turbo-0613" to reflect the latest version of the model. The default value for the OpenAI model in the text field has been updated to "text-davinci-003" to reflect the latest version of the model. This ensures that the tests are using the latest and most accurate models for OpenAI.
The `sort_fields` method has been added to the `Template` class to sort fields based on the `DIRECT_TYPES` constant. Fields that have a `field_type` in `DIRECT_TYPES` are sorted first, followed by the remaining fields. This ensures that fields that have a direct type are processed first, which is important for the correct functioning of the template.
The DIRECT_TYPES constant was removed from the vertex and graph modules as it is now defined in the utils module. This change improves code organization and reduces duplication.