🎨 style(inputListComponent): change input placeholder text to be more descriptive
The placeholder text for both input components has been changed to "Type something..." to be more descriptive and provide better guidance to the user.
FastAPI and Langchain dependencies have been updated to their latest versions to ensure that the application is using the latest features and security patches. The Llama-cpp-python dependency has also been updated to a more recent version.
The try_setting_streaming_options function now correctly sets the streaming attribute of the llm object to True if it is an instance of BaseLanguageModel and has the streaming attribute. This fixes a bug where the streaming attribute was not being set correctly.
The Makefile now has two new targets, `install_backend` and `install_frontend`, which install the dependencies for the backend and frontend respectively. This makes it easier for developers to set up the project as they can now run `make init` to install the pre-commit hooks and all dependencies.
✅ test(embeddings_template.py): add tests for openai fields formatting
The openai fields formatting is now done in a separate method, which improves the readability and maintainability of the code. Tests were added to ensure that the formatting is done correctly.
The previous condition was checking if the content was None, but it should check if it is empty. This change fixes the error message to be more accurate.
The prompt field was previously set as not required when no value was provided, but this is not the intended behavior. The prompt field should always be required, even if the default prompt is used. This commit fixes the issue by setting the required attribute to True when the value is None.
🚀 feat(config.yaml): add HuggingFaceEmbeddings to embeddings
The Jina and sentence-transformers dependencies were added to the
project to improve the functionality of the application. The
HuggingFaceEmbeddings was added to the embeddings in the config.yaml
file to improve the quality of the embeddings used in the application.
Closes#375
The `format_openai_field` method formats the display name of fields that contain the string "openai" in their name. It capitalizes the first letter of "OpenAI", replaces underscores with spaces, and replaces "Api" with "API". This improves the readability and consistency of the display names of OpenAI fields.
🚀 feat(config.yaml): add HuggingFaceEmbeddings to embeddings
The Jina and sentence-transformers dependencies were added to the project to improve the functionality of the application. The HuggingFaceEmbeddings was added to the embeddings in the config.yaml file to improve the quality of the embeddings used in the application.
Issue #375, #372
The changes in these files are purely cosmetic, fixing indentation and whitespace to improve code readability.
🔨 refactor(genericModal/index.tsx): improve code readability and add destructuring to props
The code has been refactored to improve readability and make it easier to understand. Destructuring has been added to the props to make it easier to access the values.
The ruff command was updated to fix all files in the directory instead of just the ones that have the I issue. This ensures that all files are properly formatted.
The filter parameter name was ambiguous and could be interpreted in different ways. Renaming it to filter_messages makes it clear that it is used to filter chat messages.
🔥 refactor(custom.py): remove unused import of SQL_FORMAT_INSTRUCTIONS
🔥 refactor(custom_lists.py): remove unused import of SQLDatabase and utility_type_to_cls_dict
🔥 refactor(utilities/base.py): remove unused import of utility_type_to_cls_dict
🔥 refactor(utils/util.py): remove unused function build_template_from_parameters
The changes made are mostly removing unused imports and renaming a parameter for clarity. The import of SQL_FORMAT_INSTRUCTIONS was removed as it was not being used. The function build_template_from_parameters was removed as it was not being used.
✨ feat(base.py): add support for SQLDatabase utility and filter utilities according to settings.utilities
🎨 style(frontend_node/base.py): add display_name to fields
🎨 style(frontend_node/utilities.py): format field values and types
The import statement for UtilitiesFrontendNode was incorrect, causing an import error. The import statement was corrected to import from the correct module.
Support for SQLDatabase utility was added to the type_to_loader_dict dictionary. The dictionary is now filtered according to the settings.utilities list.
The display_name attribute was added to fields in the FrontendNode class to improve the readability of the frontend.
The format_field method in the UtilitiesFrontendNode class was updated to format field values and types. The method now converts field.field_type to a list if it is a Literal type and formats field.value if it is a dictionary.
The description of the SQLAgentNode has been updated to reflect its new implementation, which now constructs a SQL agent from an LLM and tools instead of a Vector Store Router. This change was made to improve the accuracy of the description and to better reflect the functionality of the node.
The commit reorganizes the instructions for local development in CONTRIBUTING.md to make them clearer and more concise. It also adds a section on setting up pre-commit hooks to ensure consistent code formatting. Additionally, it updates the instructions for running the backend and frontend to use the `make` command for consistency and ease of use.
The `format` script has been added to the `package.json` file in the `frontend` directory. This script uses `prettier` to format all files with the extensions `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, and `.md` in the `src` directory. This ensures that the codebase is consistent and follows a standard formatting style.
The pre-push hook installation command was removed from the Makefile. This was done to avoid conflicts with other hooks that may be installed in the future.
🔧 chore(Makefile): add 'init' target to install pre-commit hooks
The pre-commit hook is added to run 'make format' before committing. This ensures that the code is formatted correctly before it is committed. The Makefile is updated to include an 'init' target that installs the pre-commit hooks.
🔥 refactor(custom_lists.py): remove unused import of vectorstores
The import of deepcopy in nodes.py and vectorstores in custom_lists.py are not used in the codebase and can be safely removed to improve code readability and maintainability.
Weaviate has been added to the list of vectorstores in the config.yaml file. A TODO comment has been added to the nodes.py file to fix the integration with Weaviate. Weaviate requires the weaviate_url to be passed as it is not part of the class or from_texts method. The add_extra_fields method needs to be fixed to include the weaviate_url parameter.
🆕 feat(.vscode/launch.json): add launch configuration for FastAPI app
The qdrant_storage directory is now added to the ignore list to prevent it from being tracked by git. A new launch configuration for FastAPI app is added to the .vscode/launch.json file. This configuration allows for debugging the app with uvicorn and sets the port to 7860, reloads the app on changes, and sets the log level to debug.
The weaviate-client package has been added as a dependency to the project to enable integration with Weaviate. This will allow the application to communicate with Weaviate and perform operations such as adding and retrieving data.
This commit extracts common field attributes to variables and sets them accordingly. The basic_fields and advanced_fields variables are used to set the show and advanced attributes of the fields. The API Key field is now displayed as "API Key" and its value is hidden. The location field now has a default value of ":memory:" and its placeholder is also set to ":memory:". The password attribute of the key fields is set to False.
Issue Implement Qdrant #361
🐛 fix(langflow): remove unused imports in base.py files
The variable node in LangChainTypeCreator was causing a type error, so a type ignore was added to fix the issue. Additionally, unused imports were removed from both base.py files.
The process_field method in the TemplateFieldCreator class is not used anywhere in the codebase and is therefore removed to improve code readability and maintainability.
This commit refactors the FrontendNode.format_field() method to improve its readability and maintainability. The method now uses helper methods to handle specific field types and values, and to determine whether a field should be shown, be a password field, or be multiline. The method also uses a dictionary to handle special fields and their respective handlers.