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.
The format_dict function was updated to set a default value for the model_name key in the value dictionary for the OpenAI, ChatOpenAI, and Anthropic models. This ensures that the model_name key always has a value, even if the options list is empty.
✨ feat(chains.py): add TemplateField 'chain_type' to support different types of QA chains
The 'memory' field was previously set to required=False, but it is actually required for the chain to function properly. This fix sets required=True for the 'memory' field.
A new TemplateField 'chain_type' has been added to support different types of QA chains. This field is of type 'str', is required, and is a list of options. It allows the user to select the type of QA chain they want to use.
The advanced field was set to True for input_key and output_key fields, which made them appear in the advanced section of the UI. This was not intended, so the advanced field is now set to False for these fields.
🐛 fix(process.py): make inputs optional in process_graph_cached function
The inputs and tweaks parameters in the process_flow endpoint are now optional, which allows for more flexibility in the API. The inputs parameter in the process_graph_cached function is now optional, which prevents a ValueError from being raised when a Chain object is processed without inputs.
The memory_key field is now set to "chat_history" by default. This change ensures that the memory_key field is always initialized with a default value, which is useful for the application's functionality.
🔨 refactor(frontend): simplify conditional rendering in InputFileComponent component
🔨 refactor(frontend): simplify arrow function in SupabaseIcon component
The empty object destructuring in the LoadingSpinner component is unnecessary and can be removed. The conditional rendering in the InputFileComponent component can be simplified by removing unnecessary parentheses. The arrow function in the SupabaseIcon component can be simplified by removing unnecessary parentheses.
The types-appdirs package was added to the poetry dependencies to provide type hints for the appdirs package. This improves the codebase's maintainability and readability by providing better type checking and documentation.