The endpoint URL in the test_init_build test has been fixed to "api/v1/build/init/test" to match the correct URL pattern. This ensures that the test is accurately testing the intended functionality.
The unnecessary imports have been removed from the chat.py file to improve code cleanliness and readability. The init_build endpoint in the chat.py file has been updated to include the flow_id as a path parameter instead of extracting it from the graph_data dictionary. This change allows for a more explicit and consistent API design.
🔧 chore(chat.py): remove unnecessary imports and reformat code for better readability
The import statement for the BuildStatus enum in the schemas module has been updated to ensure the correct import. Additionally, a new "status" field has been added to the flow_data_store dictionary to track the build status of flows. The status is set to BuildStatus.IN_PROGRESS when a flow is being built, BuildStatus.SUCCESS when the build is successful, and BuildStatus.FAILURE when there is an error during the build process. This allows for better tracking and management of flow builds.
🐛 fix(chat.py): change import statement for BuildStatus in schemas module
The BuildStatus enum is added to represent the different statuses that a build can have: SUCCESS, FAILURE, and IN_PROGRESS. This enum will be used to provide a more structured and consistent way of handling build statuses in the application.
- Added support for the CustomComponent tool in the Langflow API.
- The tool has been added to the config.yaml file.
- The CustomComponentNode class has been implemented in the frontend nodes.
- The code changes include modifications in various files for the implementation of the CustomComponent tool.
- The code changes include the addition of a new field "code" in the TemplateField class.
- The build_langchain_template_custom_component function has been implemented to build the template for the CustomComponent tool.
- New custom fields "my_id", "year", and "other_field" have been added to the template for the CustomComponent tool.
There is a recurring intermittent bug, where Chains fail to validate, with an error "Required module ____ for module ____ not found". This happens frequently for all LLMs that inherit from the LLM class (example Cohere's wrapper).
This is caused by this chunk of code.
This also explains why the bug is intermittent and not every time.
"in" is matching LLM from source_types with BaseLLM from target_reqs. Also, this doesn't need to be a nested loop, it can be done with one loop.
I'm a user of LangFlow, and a first time contributor. Thanks!
🐛 fix(chatComponent): remove console.log statements for 'open' and 'isBuilt' variables to clean up code
🐛 fix(formModal): remove unnecessary console.log statement for 'tabsState[id.current]' variable to clean up code
🐛 fix(PageComponent): set isPending to true for each tab in the Page component state to fix a bug
The `instantiate_textsplitter` function has been refactored to improve readability and remove unnecessary code. The condition for creating the `text_splitter` object has been simplified and the `separator_type` parameter is now removed from the `params` dictionary if it exists. Additionally, the `language` parameter is now passed as an instance of the `Language` class from the `langchain.text_splitter` module. This change ensures that the `text_splitter` object is created correctly and the `split_documents` method is called with the appropriate parameters.
The options list for the separator_type field in the TextSplittersFrontendNode class has been extracted into a variable called options. This improves code readability and allows for easier modification and sorting of the options list.
The documentation link for ConversationBufferMemory in the memories section has been updated to point to the correct URL "https://python.langchain.com/docs/modules/memory/how_to/buffer". This change ensures that users can access the correct documentation for using ConversationBufferMemory.
💡 chore(loading.py): improve code readability and maintainability by simplifying the instantiation of the prompt object and assignment of format_kwargs dictionary.
The code has been refactored to use a dictionary comprehension to create the format_kwargs dictionary. This simplifies the logic and improves code readability. The commented out code for the prompt.partial() method has been removed as it is no longer necessary.
🔥 chore(promptModal): remove unused promptModal component
🔨 refactor(promptComponent): use useEffect to make a POST request to validate the prompt value and update the nodeClass state if the API returns data
✨ feat(utils.py): add support for setting input keys values from artifacts in build_input_keys_response function
The build_input_keys_response function now takes an additional parameter, artifacts, which is a dictionary containing key-value pairs. The function sets the values of the input keys in the input_keys_response dictionary based on the corresponding keys in the artifacts dictionary. This allows for more flexibility in setting the input keys values dynamically based on the provided artifacts.
✨ feat(chat.py): update build_input_keys_response function to accept artifacts parameter to set input_keys values
The stream_build function now supports the artifacts parameter, which allows passing prompt variables to the build_input_keys_response function. This ensures that the input_keys values are correctly set based on the provided artifacts. The build_input_keys_response function has been updated to accept the artifacts parameter and use it to set the input_keys values. This improves the functionality of the chat module by allowing more flexibility in handling prompt variables.
🐛 fix(vertex/base.py): update instantiation logic to handle tuple result from loading.instantiate_class()
🐛 fix(loading.py): update return value of instantiate_prompt() to return a tuple of prompt and format_kwargs
The Vertex class now has a new attribute called artifacts, which is a dictionary used to store additional data related to the vertex. The instantiation logic in the Vertex class has been updated to handle the case where loading.instantiate_class() returns a tuple containing the built object and additional artifacts. The loading.instantiate_prompt() function now returns a tuple containing the prompt and format_kwargs. These changes fix issues related to storing and handling additional data in the vertex and loading modules.
The build_input_keys_response function now correctly filters out memory variables from the input keys response. Previously, it was using a list comprehension to filter the keys, but it should have been using a dictionary comprehension to preserve the key-value pairs. This fix ensures that only the keys that are not present in the langchain_object's memory variables are included in the input keys response.
The chat history is now reset when building a flow to ensure that the chat starts with a clean state. This helps prevent any potential issues or conflicts that may arise from previous chat interactions.
🐛 fix(loading.py): set input variable values if they are present in params
The "input_variables" field in the prompt's frontend_node template is now updated with the new list of variables, if it exists. This ensures that the input variables are correctly set when validating the prompt. In the loading module, the input variable values are now set if they are present in the params dictionary. This ensures that the prompt is correctly instantiated with the provided input variable values.
🐛 fix(formModal/index.tsx): format chatItem.message only if it is not from a bot to improve readability
🐛 fix(formModal/index.tsx): remove unnecessary console.log statement
✨ feat(ApiModal/index.tsx): add functionality to filter nodes and display only nodes with certain types in the tweaks list
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the tweaks list not updating when the flow changes
🐛 fix(ApiModal/index.tsx): fix issue with the
- Updated hover and transition effects for several components
- Removed unnecessary CSS classes and styles
- Adjusted colors and text styles for better visual consistency
- Refactored crash error component to update the background color of the reset button.
- Removed commented code in the header component.
- Imported BUTTON_DIV_STYLE constant in the main page component.