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.
✨ feat(chat.py): add progress information to the stream_build function
The stream_build function now returns StreamData objects instead of strings, which improves the readability of the code. The function also now includes progress information in the response, which allows the client to track the progress of the build process.
The code now checks if the flow already exists in the cache and deletes it before initializing the build. This ensures that the cache is always up to date and avoids any inconsistencies that may arise from having outdated data in the cache.
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.
This commit adds a new file called `extract_info_from_class.py` containing a `ClassCodeExtractor` class that can extract information (imports, class details and functions) from a Python class code. It also adds a function called `is_valid_class_template` that checks if a given Python class code matches a certain template. Additionally, the commit adds a new endpoint in the `/custom_component` route of `endpoints.py` that returns a dictionary of all `langchain` types created by a specific creator. Finally, the commit adds a new section to `types.py` named `template_node`, which describes a default dictionary that can be used to define a new node for Langflow's template editor.
🚀 feat(frontend): add hover effect to file search icon in InputFileComponent
🚀 feat(frontend): add support for dark mode in alert icons
🚀 feat(frontend): add support for dark mode in dropdown chevron icon
🚀 feat(frontend): add support for dark mode in success alert icon
🚀 feat(frontend): add support for dark mode in notice alert icon
🚀 feat(frontend): add support for dark mode in error alert icon
🚀 feat(frontend): add support for process.env.PORT environment variable to be able to run app on a configurable port
🚀 feat(frontend): add parameter types to GenericNode component
🚀 feat(frontend): add hover effect to external link icon in CodeAreaComponent
🚀 feat(frontend): add hover effect to plus icon in MenuBar component
🚀 feat(frontend): add hover effect to settings icon in MenuBar component
🚀 feat(frontend): add hover effect to undo icon in MenuBar component
🚀 feat(frontend): add hover effect to redo icon in MenuBar component
🎨 style(inputListComponent): add space before self-closing tag to improve readability
🎨 style(promptComponent): add space before self-closing tag to improve readability
🎨 style(ApiModal): fix indentation to improve readability
🎨 style(chatInput): add space before self-closing tag to improve readability
🎨 style(chatMessage): remove unnecessary line breaks to improve readability
🎨 style(fileComponent): add space before self-closing tag to improve readability
🎨 style(chatModal): remove unnecessary line breaks to improve readability
🎨 style(codeAreaModal): fix indentation to improve readability
🎨 style(genericModal): fix indentation to improve readability
🎨 style(DisclosureComponent): add space before self-closing tag to improve readability
🎨 style(extraSidebarComponent): fix indentation to improve readability
The import statements for the weaviate and pinecone libraries were causing import errors. Adding the `# type: ignore` comment suppresses these errors and allows the code to run without issues.
This commit adds type hinting to the function arguments of `get_result_and_thought` and `process_graph_cached` functions in `process.py` file. This improves code readability and maintainability.
🐛 fix(chatMessage): replace ChatBubbleOvalLeftEllipsisIcon with MessageCircle icon for consistency and better semantics
🎨 style(frontend): replace heroicons with lucide-react icons for consistency and better performance
🐛 fix(ApiModal): replace CodeBracketSquareIcon with Code2 icon for better semantics and consistency
🎨 style(frontend): replace heroicons with lucide-react icons for consistency and better design
🎨 style(genericModal/index.tsx): replace DocumentTextIcon with FileText icon from lucide-react library
🎨 style(importModal/buttonBox/index.tsx): remove unused imports
🎨 style(DisclosureComponent/index.tsx): replace ChevronRightIcon with ChevronRight icon from lucide-react library
🎨 style(extraSidebarComponent/index.tsx): replace Bars2Icon with Menu icon from lucide-react library
🔥 chore(entities/index.ts): remove unused HomeIcon import from heroicons-react library
This commit updates the langchain dependency from version 0.0.208 to version 0.0.209. This is a minor version update and is done to keep the dependency up-to-date with the latest features and bug fixes.
🐛 fix(graph.py): change message variable to a dictionary to match the expected input of get_result_and_thought function and update the assertion to check if the result is a dictionary instead of a string
The test for agents_template.py was updated to include the openai-multi-functions agent in the list of agents. This was done to ensure that the test coverage for the agent is complete.
The test for graph.py was updated to change the message variable to a dictionary to match the expected input of the get_result_and_thought function. The assertion was also updated to check if the result is a dictionary instead of a string. This was done to ensure that the test coverage for the function is complete.
The `initialize_chroma` function had redundant code that was removed. The `embedding_function` parameter was renamed to `embedding` to match the parameter name used in the `class_object` constructor. The `documents` and `texts` parameters were being used interchangeably, so the code was updated to use only `documents`.
The `name` parameter in the `format_field` method of the `DocumentLoaderFrontNode` class now uses the `Optional` type hint to indicate that it can be None. This improves the code's readability and makes it easier to understand the expected behavior of the method.
The function now checks if "texts" is in the params dictionary and renames it to "documents" for consistency. The "supabase_url" and "supabase_service_key" are now removed from the params dictionary and passed directly to the create_client function. The function also removes the "documents" and "texts" keys from the params dictionary if there are no documents in the params. This improves the readability of the code and removes redundant code.
The log level of the sorted vertices in the generator_build method of the Graph class has been changed from info to debug. This is because the sorted vertices are not critical information and are only useful for debugging purposes.
✨ feat(vector_store.py): add support for Supabase client object to be passed in as a parameter
The 'texts' parameter has been renamed to 'documents' to improve semantics. This change makes it clearer that the parameter is a list of documents. Additionally, support for a Supabase client object has been added as a parameter. This allows for more flexibility in the initialization of the SupabaseVectorStore class.
The SupabaseVectorStore is now supported in the vectorstores configuration in the config.yaml file. The SupabaseIcon has been added to the nodeIcons object in the utils.ts file to be able to display the icon for the SupabaseVectorStore.
The SupabaseVectorStore type requires additional fields such as table_name, query_name, supabase_url, and supabase_service_key. These fields are added to the extra_fields list and are then added to the list of fields that are displayed to the user. This change allows the user to create a SupabaseVectorStore with the required fields.
🚀 feat(vector_store.py): add support for initializing SupabaseVectorStore
This commit adds support for initializing new vector store types in the loading.py file. Specifically, the initialize_weaviate, initialize_faiss, and initialize_supabase functions were added to support the Weaviate, FAISS, and SupabaseVectorStore vector stores, respectively. The vector_store.py file was also updated to include the SupabaseVectorStore class and the initialize_supabase function. This allows for more flexibility in choosing vector stores for the application.
The websockets version was downgraded to 10.3 to fix compatibility issues with other dependencies. Supabase was added to the dependencies to support it as a vector store. The initialize_supabase function was added to initialize the Supabase client and return the class object. This allows the use of Supabase as a vector store in the application.
🚀 chore(pyproject.toml): downgrade websockets version to 10.3
🚀 chore(pyproject.toml): add supabase to dependencies