617552d212Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component
gustavoschaedler
2023-07-05 14:44:18 +01:00
fd16b385abfeat: Add dynamic field to code field in types module
gustavoschaedler
2023-07-05 14:44:11 +01:00
8b0a39f6eefix(codeAreaModal): move postCustomComponent call inside else block to prevent unnecessary API calls when condition is false fix(codeAreaModal): remove commented out code for axios.get call
anovazzi1
2023-07-05 10:44:00 -03:00
8d77e51037🔧 chore(pre-commit): change file mode from 100644 to 100755 for better execution permissions The file mode of the pre-commit hook has been changed from 100644 to 100755. This change ensures that the pre-commit hook has the necessary execution permissions, allowing it to be executed properly before each commit.
Gabriel Luiz Freitas Almeida
2023-07-05 09:49:18 -03:00
a69225bb07🔧 chore(loading.py): remove unused import statement 🐛 fix(loading.py): remove unnecessary None default value for file_filter parameter The unused import statement from langchain.prompts.base has been removed to improve code cleanliness. The None default value for the file_filter parameter in the instantiate_documentloader function has been removed as it is unnecessary and can be safely assumed that the parameter will always be provided.
Gabriel Luiz Freitas Almeida
2023-07-05 09:46:27 -03:00
5879ad99f2🔥 refactor(main.py): remove unused /dynamic_node endpoint and template_node variable 💡 chore(main.py): clean up code by removing an unused endpoint and a template_node variable that is no longer needed The /dynamic_node endpoint and the template_node variable are no longer used in the application and can be safely removed. This improves code cleanliness and reduces unnecessary complexity.
Gabriel Luiz Freitas Almeida
2023-07-05 09:41:40 -03:00
3059e8c670🐛 fix(base.py): fix add_edge method to prevent adding duplicate edges 🐛 fix(base.py): fix __eq__ method in Edge class to correctly compare objects The add_edge method in the Vertex class has been modified to prevent adding duplicate edges. Now, before adding an edge, it checks if the edge already exists in the edges list to avoid duplicates.
Gabriel Luiz Freitas Almeida
2023-07-05 09:37:25 -03:00
b8e76b0be4🐛 fix(parameterComponent): remove unnecessary line break to improve code readability 🐛 fix(utils.ts): set 'type' property to an empty string instead of undefined to avoid potential issues
Cristhian Zanforlin Lousa
2023-07-05 06:52:01 -03:00
6d9bcd5e65🔧 chore(Makefile): make pre-commit hook executable The pre-commit hook in the .githooks directory was not executable, causing it to not be triggered. This commit makes the pre-commit hook executable by adding the chmod +x command to set the executable permission on the pre-commit hook file.
Gabriel Luiz Freitas Almeida
2023-07-05 00:03:32 -03:00
10bbb8e901style: improve readability
Gabriel Luiz Freitas Almeida
2023-07-05 00:01:06 -03:00
834429cd37fix: add verification for formKeysData
Gabriel Luiz Freitas Almeida
2023-07-04 23:58:54 -03:00
839e9737ccRefactor code to extract class name from custom code
gustavoschaedler
2023-07-05 03:34:16 +01:00
5445adbbce🐛 fix(validate.py): set new field value with the old value if variable already exists in the template The code now checks if the variable already exists in the template and if so, sets the new field value with the old value. This ensures that the existing value is preserved when adding new variables to the template.
Gabriel Luiz Freitas Almeida
2023-07-04 23:32:25 -03:00
244aeae916🔧 chore(validate.py): add multiline option to input_variables field in add_new_variables_to_template function The multiline option is added to the input_variables field in the add_new_variables_to_template function. This allows the field to accept multiline input, which can be useful in certain scenarios where multiple lines of text need to be entered.
Gabriel Luiz Freitas Almeida
2023-07-04 23:29:51 -03:00
44011f3dd5🐛 fix(GenericNode/index.tsx): fix class order in div element to ensure correct styling ✨ feat(GenericNode/index.tsx): improve readability and maintainability by extracting repeated class names into variables The class order in the div element has been fixed to ensure the correct styling is applied. Repeated class names have been extracted into variables to improve readability and maintainability of the code.
Gabriel Luiz Freitas Almeida
2023-07-04 23:25:18 -03:00
ac569f3405Refactor code, improve type validation, and update build function name
gustavoschaedler
2023-07-05 02:03:22 +01:00
64e5a3a98dAdd a dynamic flag to CustomComponentNode
gustavoschaedler
2023-07-05 01:30:40 +01:00
84aa84cc08feat: Add community page constants classes
Igor Carvalho
2023-07-04 21:02:43 -03:00
4028554ef6Refactor build method argument name for clarity
gustavoschaedler
2023-07-05 00:57:16 +01:00
92b747b6daUpdate Vertex params with code type and add a my_conversation method to the MyPythonClass. Modify the instantiate_tool function to properly handle the CustomComponent node type. Add a dynamic field to the FrontendNode class.
gustavoschaedler
2023-07-05 00:46:51 +01:00
fdad5e7da3feat: add main page constants classes
Igor Carvalho
2023-07-04 20:44:38 -03:00
04c3cb2d4efeat: add flowpage constants classes
Igor Carvalho
2023-07-04 20:30:03 -03:00
b6192162b0feat: add side bar components disclosure constants classes
Igor Carvalho
2023-07-04 20:17:09 -03:00
4f33f02d4f🐛 fix(parameterComponent): fix syntax error in refHtml.current assignment 🐛 fix(parameterComponent): fix classNames usage in span element 🐛 fix(parameterComponent): remove unnecessary line break element 🐛 fix(parameterComponent): fix className usage in span element 🐛 fix(ShadTooltipComponent): add className prop to TooltipContent component 🐛 fix(utils): fix syntax error in groupByFamily function ✨ feat(parameterComponent): add support for grouping and displaying multiple types in parameterComponent ✨ feat(utils): add support for grouping and filtering data in groupByFamily function
Cristhian Zanforlin Lousa
2023-07-04 19:08:19 -03:00
0d6293de17fix(codeAreaModal): move postCustomComponent call outside of the else block to ensure it is always executed
anovazzi1
2023-07-04 15:51:32 -03:00
da4be03451using post
anovazzi1
2023-07-04 15:46:38 -03:00
cbcb8bf36dfeat(utils.ts): add custom icon for Edit functionality in nodeIconsLucide to improve user experience
anovazzi1
2023-07-04 15:32:18 -03:00
57a12d2084fix(codeAreaModal): comment out unused code block to improve code readability fix(codeAreaModal): fix condition in TabsTrigger component to correctly disable the error tab when error detail is undefined
anovazzi1
2023-07-04 15:22:38 -03:00
18a2459131fix(codeAreaModal): initialize error state with null to avoid undefined error fix(codeAreaModal): disable second tab trigger if error detail is null to prevent user from switching to it
anovazzi1
2023-07-04 15:13:57 -03:00
9b185fada5🐛 fix(GenericNode/index.tsx): fix incorrect class names for validation status indicators The class names for the validation status indicators were incorrect, causing the wrong styles to be applied. The class names have been fixed to correctly display the validation status indicators based on the validation status and whether the node is building.
Gabriel Luiz Freitas Almeida
2023-07-04 10:41:14 -03:00
a3792577a8🔄 refactor(vertex/base.py): rename Node class to Vertex class for better clarity and consistency 🔄 refactor(template/frontend_node/documentloaders.py): rename web_path variable to file_path for better clarity and consistency in the GutenbergLoader class The Node class in the vertex/base.py file has been renamed to Vertex class to improve clarity and consistency in the naming conventions used throughout the codebase. In the template/frontend_node/documentloaders.py file, the web_path variable has been renamed to file_path in the GutenbergLoader class to provide better clarity and consistency in the naming conventions used within the class.
Gabriel Luiz Freitas Almeida
2023-07-04 10:08:41 -03:00
0cf94f37f6🔒 chore(vectorstores.py): add password field to extra_fields in VectorStoreFrontendNode class The password field is added to the extra_fields list in the VectorStoreFrontendNode class. This allows for the creation of a password input field in the frontend UI for this specific class.
Gabriel Luiz Freitas Almeida
2023-07-04 09:58:11 -03:00
7d098ab927🔒 chore(vectorstores.py): add password field to extra_field2 in VectorStoreFrontendNode class The password field is added to the extra_field2 in the VectorStoreFrontendNode class. This allows the field to be displayed as a password input in the frontend, enhancing security by hiding the input characters.
Gabriel Luiz Freitas Almeida
2023-07-04 09:56:52 -03:00
608145af9e🔧 chore(documentloaders.py): moved GutenbergLoader to be used with web_path
Gabriel Luiz Freitas Almeida
2023-07-04 09:51:48 -03:00
8a4f1406de🐛 fix(validate.py): fix input_types in add_new_variables_to_template function to use correct input types The input_types in the add_new_variables_to_template function were incorrect. They were set to ["BaseLoader", "BaseOutputParser"] instead of ["Document", "BaseOutputParser"]. This fix ensures that the correct input types are used for the template field.
Gabriel Luiz Freitas Almeida
2023-07-04 09:49:00 -03:00
4ca432c4c0📦 chore(pyproject.toml): update langchain-serve version to >0.0.49 The langchain-serve package version has been updated to >0.0.49. This change is made to ensure compatibility with the latest version of the package and to take advantage of any bug fixes or new features introduced in the updated version.
Gabriel Luiz Freitas Almeida
2023-07-04 07:28:05 -03:00
1947cf9481run poetry.lock
Gabriel Luiz Freitas Almeida
2023-07-04 07:20:55 -03:00
3f063f099d🔺 chore(pyproject.toml): update langchain-serve version to >0.0.50 The langchain-serve package has been updated to version >0.0.50. This update may include bug fixes, new features, or other improvements.
Gabriel Luiz Freitas Almeida
2023-07-03 23:28:07 -03:00
9e1bb15003🐛 fix(main.py): fix formatting of multiline string in my_user_python_function value 🔀 chore(main.py): add trailing commas to dictionary entries for improved readability The multiline string in the value of the my_user_python_function key was not properly formatted. The double quotes were changed to triple quotes to match the Python docstring convention. Trailing commas were added to the dictionary entries for improved readability and maintainability.
Gabriel Luiz Freitas Almeida
2023-07-03 23:27:59 -03:00
3c7ecd15f7🐛 fix(validate.py): check if variable is already in the list before appending and remove variable from custom_fields and template when not in input_variables The code now checks if the variable is already in the list before appending it to the custom_fields. Additionally, when removing old variables from the template, the code now also removes the variable from the custom_fields associated with the given name. This ensures that the custom_fields and template stay in sync with the input_variables.
Gabriel Luiz Freitas Almeida
2023-07-03 23:27:49 -03:00
ac4b322c88🔨 refactor(parameterComponent): improve code formatting and indentation for better readability The unused import of the lodash library has been removed to clean up the code and reduce unnecessary dependencies. The code formatting and indentation have also been improved to enhance readability and maintain consistency throughout the file. 🔥 refactor(parameterComponent): remove unused import of lodash library
Gabriel Luiz Freitas Almeida
2023-07-03 23:27:27 -03:00
77a1a9c065added field_name attribute
Gabriel Luiz Freitas Almeida
2023-07-03 23:12:56 -03:00
00f4726f38🔧 chore(EditNodeModal): reorder CSS classes in DialogContent and TableCell components for consistency 🔧 chore(EditNodeModal): add field_name prop to PromptAreaComponent for better clarity and maintainability
Gabriel Luiz Freitas Almeida
2023-07-03 23:12:30 -03:00
67ffdcd0c7🔧 chore(API/index.ts): add name parameter to postValidatePrompt function for improved code readability The postValidatePrompt function now accepts a name parameter, which represents the name of the field to check. This change improves the code readability by explicitly specifying the name of the field being validated.
Gabriel Luiz Freitas Almeida
2023-07-03 23:12:18 -03:00
2344c575cf🔧 fix(promptComponent): fix linting issues and add missing field_name prop 🚀 feat(promptComponent): improve prompt functionality by adding missing field_name prop Fixed some linting issues in the PromptAreaComponent and added the missing field_name prop to improve code quality and maintainability. The field_name prop was missing, which caused an error in the postValidatePrompt function. This commit also improves the prompt functionality by ensuring that the reactFlowInstance is updated and the nodes are re-rendered when the value changes.
Gabriel Luiz Freitas Almeida
2023-07-03 23:11:37 -03:00
6431b50fa6🐛 fix(base.py): change custom_fields default value from an empty list to a defaultdict to prevent potential errors The custom_fields attribute in the FrontendNode class now has a default value of defaultdict(list) instead of an empty list. This change ensures that custom_fields is always a defaultdict, which prevents potential errors when accessing or modifying the custom_fields attribute.
Gabriel Luiz Freitas Almeida
2023-07-03 23:11:08 -03:00
88dbff7bf5🚀 feat(base.py): add 'name' field to ValidatePromptRequest model for improved data validation The 'name' field is added to the ValidatePromptRequest model to enhance data validation. This field will allow for more specific identification and validation of prompt names in the API.
Gabriel Luiz Freitas Almeida
2023-07-03 23:10:56 -03:00
d5c7fb9dc5🐛 fix(validate.py): rename parameter 'prompt' to 'prompt_request' in post_validate_prompt function for clarity ✨ feat(validate.py): refactor post_validate_prompt function to improve code readability and maintainability The parameter 'prompt' in the 'post_validate_prompt' function has been renamed to 'prompt_request' to improve clarity and avoid confusion with the 'prompt' variable used within the function. The function has also been refactored to improve code readability and maintainability by extracting logic into separate helper functions. The helper functions 'get_old_custom_fields', 'add_new_variables_to_template', 'remove_old_variables_from_template', and 'update_input_variables_field' have been added to handle specific tasks within the 'post_validate_prompt' function. This refactoring improves the overall structure and organization of the code.
Gabriel Luiz Freitas Almeida
2023-07-03 23:10:41 -03:00
369a32d53a🎨 style(extraSidebarComponent): add bottom padding to the overflow container to improve UI spacing
Lucas Oliveira
2023-07-03 22:25:02 -03:00
3c29410488Changed dark mode colors
Lucas Oliveira
2023-07-03 22:22:48 -03:00
54474889e1🐛 fix(GenericNode/index.tsx): fix title prop in ParameterComponent to handle cases where data.node.output_types is an empty array 🔧 chore(GenericNode/index.tsx): add console.log for debugging purposes
Lucas Oliveira
2023-07-03 22:20:58 -03:00
d4b0ce9851🐛 fix(codeAreaComponent): fix type name in function parameter to match imported type 🐛 fix(textAreaComponent): fix class name in className to match CSS class name convention
Lucas Oliveira
2023-07-03 22:16:17 -03:00
a9cd09dc5eMerge branch 'form_io' of github.com:logspace-ai/langflow into form_io
Lucas Oliveira
2023-07-03 22:09:53 -03:00
dde42eec0f🎨 style(chatTrigger): update chat trigger button styles to include disabled state 🔧 chore(index.css): add CSS variable for disabled chat trigger color 🔧 chore(tailwind.config.js): add CSS variable for disabled chat trigger color
Lucas Oliveira
2023-07-03 22:09:43 -03:00
19d161aec3📝 docs(config.yaml): add documentation links for new modules and update existing links 🔖 chore(config.yaml): update documentation links for vectorstores and output parsers Added documentation links for the following new modules: - MongoDBChatMessageHistory - ChatMessagePromptTemplate - HumanMessagePromptTemplate - SystemMessagePromptTemplate - ChatPromptTemplate
Gabriel Luiz Freitas Almeida
2023-07-03 22:09:02 -03:00
18a04ad170🔀 refactor(constants.py): refactor VERTEX_TYPE_MAP to use explicit import paths for better readability and maintainability The VERTEX_TYPE_MAP dictionary in constants.py has been refactored to use explicit import paths for each vertex type. This improves the readability and maintainability of the code by making it clear where each vertex type is coming from.
Gabriel Luiz Freitas Almeida
2023-07-03 21:56:49 -03:00
3bab730e65🔀 refactor(base.py): import field_formatters module instead of importing specific module 🔀 refactor(base.py): move FieldFormatters class to the top of the file for better organization The import statement in the base.py file has been updated to import the field_formatters module instead of importing specific modules. This change improves maintainability and readability by reducing the number of import statements and consolidating them into a single import. Additionally, the FieldFormatters class has been moved to the top of the file for better organization and readability.
Gabriel Luiz Freitas Almeida
2023-07-03 21:56:28 -03:00
d0217f0c26Merge branch 'dev' into form_io, bugs on backend
Lucas Oliveira
2023-07-03 21:53:56 -03:00
f8d9f47b7e🐛 fix(parameterComponent): fix classNames order in ParameterComponent to ensure correct styling 🐛 fix(utils): fix logic in isValidConnection to correctly check for valid connections ✨ feat(parameterComponent): add support for left alignment of parameter title in ParameterComponent ✨ feat(utils): add support for filtering grouped data by parentOutput in groupByFamily function
Cristhian Zanforlin Lousa
2023-07-03 18:53:02 -03:00
Implementing @layer components for CSS (#594)
anovazzi1
2023-07-03 17:59:34 -03:00
f79ee7092a🐛 fix(validate.py): update input_types in template_field to ["Document", "BaseOutputParser"] for better accuracy 🐛 fix(base.py): remove "object" from CLASSES_TO_REMOVE list to prevent unnecessary removal In validate.py, the input_types in the template_field for the "prompt" variable is updated to ["Document", "BaseOutputParser"] to accurately reflect the expected input types.
Gabriel Luiz Freitas Almeida
2023-07-03 17:35:44 -03:00
77c423fd0c🔧 fix(ApiModal): update CSS classes for responsive layout and code readability
Cristhian Zanforlin Lousa
2023-07-03 17:08:58 -03:00
0cfcfcb912🐛 fix(types.py): remove extra blank line to improve code readability 🐛 fix(GenericNode/index.tsx): remove unused imports and unused variable to improve code cleanliness The extra blank line in the types.py file has been removed to improve the readability of the code. In the GenericNode/index.tsx file, unused imports and an unused variable have been removed to clean up the code and improve maintainability.
Gabriel Luiz Freitas Almeida
2023-07-03 16:38:06 -03:00
db17aceb3b🔧 fix(base.py): add output_types field to FrontendNode class to support specifying output types 🔧 fix(documentloaders.py): add_extra_base_classes method to set base_classes and output_types for DocumentLoaderFrontNode 🔧 fix(textsplitters.py): add_extra_base_classes method to set base_classes and output_types for TextSplittersFrontendNode 🔧 fix(vectorstores.py): change field_type to "Document" for documents field in VectorStoreFrontendNode 🔧 fix(index.ts): add output_types field to APIClassType interface The changes were made to add support for specifying output types in the FrontendNode class and its subclasses. This allows for more flexibility in defining the behavior and capabilities of the frontend nodes in the application.
Gabriel Luiz Freitas Almeida
2023-07-03 16:37:37 -03:00
8e6c537d76🐛 fix(ApiModal/index.tsx): fix indentation and spacing issues for better code readability ✨ feat(ApiModal/index.tsx): improve UI by adjusting the layout and styling of the modal components
Cristhian Zanforlin Lousa
2023-07-03 16:21:20 -03:00
c66939f7c2🔧 chore(frontend): remove unused imports and constants from codeAreaComponent, dropdownComponent, floatComponent, inputComponent, inputFileComponent, inputListComponent, intComponent, promptComponent, and textAreaComponent
Cristhian Zanforlin Lousa
2023-07-03 16:17:57 -03:00
d371a08d9eChat disabled when not built
Lucas Oliveira
2023-07-03 14:52:14 -03:00
Fix Styles in general (#577)
Cristhian Zanforlin Lousa
2023-07-03 10:58:33 -03:00
f3ae913891🐛 fix(dialog.tsx): add missing gap-3 utility class to DialogContent component to fix layout issue 🐛 fix(EditNodeModal/index.tsx): remove unnecessary padding-bottom class from Parameters text span to fix layout issue
Cristhian Zanforlin Lousa
2023-07-03 10:25:47 -03:00
2f469afe69🐛 fix(dialog.tsx): remove unnecessary animation classes to improve performance and simplify code 🐛 fix(EditNodeModal/index.tsx): adjust styling to improve layout and readability
Cristhian Zanforlin Lousa
2023-07-03 10:03:44 -03:00
5c5672949a🔖 chore(pyproject.toml): update package version to 0.2.11 ⬆️ chore(pyproject.toml): update fastapi dependency to version 0.99.0 The package version has been updated from 0.2.10 to 0.2.11. This change reflects the new version of the package. Additionally, the fastapi dependency has been updated from version 0.98.0 to 0.99.0 to ensure compatibility with the latest version of fastapi.
Gabriel Luiz Freitas Almeida
2023-07-03 09:17:01 -03:00
51b0ff2bb4🔧 chore(chat.py): add missing build step for root node in graph 📝 docs(chat.py): explain the need for building the root node before the rest of the graph The root node in the graph was not being built before the rest of the graph, which caused issues when certain nodes required parameters that were not connected to them. By adding the missing build step for the root node, we ensure that all necessary connections and parameters are properly set up before building the rest of the graph. This improves the overall functionality and reliability of the chat module.
Gabriel Luiz Freitas Almeida
2023-07-03 09:12:59 -03:00
Merge branch 'main' into release
Gabriel Luiz Freitas Almeida
2023-07-03 09:19:17 -03:00
7d7db02fb6🔖 chore(pyproject.toml): update package version to 0.2.11 ⬆️ chore(pyproject.toml): update fastapi dependency to version 0.99.0 The package version has been updated from 0.2.10 to 0.2.11. This change reflects the new version of the package. Additionally, the fastapi dependency has been updated from version 0.98.0 to 0.99.0 to ensure compatibility with the latest version of fastapi.
Gabriel Luiz Freitas Almeida
2023-07-03 09:17:01 -03:00
b3addfbeeemerge fix dev
Cristhian Zanforlin Lousa
2023-07-03 09:15:40 -03:00
🔧 chore(chat.py): add build step for root node in graph
Gabriel Luiz Freitas Almeida
2023-07-03 09:14:36 -03:00
1d22e8c97a🔧 chore(chat.py): add missing build step for root node in graph 📝 docs(chat.py): explain the need for building the root node before the rest of the graph The root node in the graph was not being built before the rest of the graph, which caused issues when certain nodes required parameters that were not connected to them. By adding the missing build step for the root node, we ensure that all necessary connections and parameters are properly set up before building the rest of the graph. This improves the overall functionality and reliability of the chat module.
Gabriel Luiz Freitas Almeida
2023-07-03 09:12:59 -03:00
c1175e4961🔧 chore(base.py): remove unnecessary debug log and add success log for database and tables creation The debug log statement "Database and tables created" has been removed as it is unnecessary. Instead, a success log statement "Database and tables created successfully" has been added to indicate that the database and tables were created without any errors. This improves the clarity of the log messages and provides better feedback during the database setup process.
Gabriel Luiz Freitas Almeida
2023-07-03 08:46:01 -03:00
35e0ea9d80🔧 chore(settings.py): update environment variable prefix from "LANGFLOW_" to "langflow_" for consistency The environment variable prefix used in the settings.py file has been updated from "LANGFLOW_" to "langflow_" to maintain consistency with the naming conventions used in the project. This change ensures that all environment variables related to the Langflow backend have a consistent prefix.
Gabriel Luiz Freitas Almeida
2023-07-02 16:20:17 -03:00
9f2b6443cfdebugging improvements
Gabriel Luiz Freitas Almeida
2023-07-02 16:11:51 -03:00