The code that was causing issues with file upload has been commented out for now. The code was resetting the content of a file, which was causing issues with the file upload.
🎨 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.
The CohereEmbeddings is added to the list of supported embeddings in the config.yaml file. This allows the application to use the CohereEmbeddings for language processing tasks.
✨ feat(pyproject.toml): add cohere dependency to enable new features
🔧 chore(config.yaml): add Cohere to the list of supported LLMS
The langchain dependency was updated to version 0.0.183 to take advantage of the latest features and bug fixes. The cohere dependency was added to enable new features. Cohere is now added to the list of supported LLMS in the config.yaml file.
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.
🐛 fix(utils.py): fix setting of streaming option for llm
🎨 style(llms.py): add model_file and model_type fields to the list of non-advanced fields
The first change adds CTransformers to the list of supported llms in the config.yaml file. The second change fixes a bug in the try_setting_streaming_options function in utils.py where the streaming option was not being set correctly. The third change is a style change that adds the model_file and model_type fields to the list of non-advanced fields in the LLMFrontendNode class in llms.py.
✅ 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.
🐛 fix(GenericNode): add semicolon to console.log statement
The use of eval in the code can be a security risk as it can execute arbitrary code. Using ast.literal_eval instead of eval is a safer alternative as it only evaluates a subset of Python expressions. The semicolon was added to the console.log statement to improve code consistency.
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.
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 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 `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.
🔥 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.
✨ feat(GenericNode): add ChromaIcon and fix validation status icons
🎨 style(GenericNode): refactor GenericNode component to improve readability
🐛 fix(vite.config.ts): add svgr plugin to the frontend Vite configuration
The vite-plugin-svgr dependency was added to both the root and frontend package.json files to enable the use of SVG files as React components. The GenericNode component was updated to include the ChromaIcon component and to fix the validation status icons. The component was also refactored to improve readability. The svgr plugin was added to the frontend Vite configuration to enable the use of SVG files as React components.
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.
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.