Commit graph

1,725 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
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
2023-07-03 10:25:47 -03:00
Cristhian Zanforlin Lousa
ece63913b0 merge conflicts 2023-07-03 10:06:23 -03:00
Cristhian Zanforlin Lousa
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
2023-07-03 10:03:44 -03:00
Gabriel Luiz Freitas Almeida
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.
2023-07-03 09:43:08 -03:00
Cristhian Zanforlin Lousa
b3addfbeee merge fix dev 2023-07-03 09:15:40 -03:00
Cristhian Zanforlin Lousa
b27ec98b62 merge conflicts 2023-07-03 09:09:10 -03:00
Gabriel Luiz Freitas Almeida
ac1b095472
FIX: Preserve some colours during purging or our status lights go away. (#588) 2023-07-02 15:57:43 -03:00
Gabriel Luiz Freitas Almeida
91fe9c653f Merge branch 'release' into dev 2023-07-02 15:54:38 -03:00
Gabriel Luiz Freitas Almeida
ff254029bf style: apply tailwind formatting 2023-07-02 10:29:24 -03:00
Gabriel Luiz Freitas Almeida
032c616c00 ⚙️ chore(frontend): add Prettier and Prettier plugin for Tailwind CSS
The package.json file has been updated to include the dependencies for Prettier and the Prettier plugin for Tailwind CSS. Prettier is a code formatter that helps maintain consistent code style across the project. The Prettier plugin for Tailwind CSS ensures that the Tailwind CSS code is formatted correctly. Additionally, a new prettier.config.js file has been added to configure Prettier with the Tailwind CSS plugin. This will improve the code formatting and maintainability of the frontend codebase.
2023-07-02 10:28:44 -03:00
Snow
3251e753a1 FIX: Preserve some colours during purging or our status lights go away. 2023-07-02 07:52:57 +10:00
Gabriel Luiz Freitas Almeida
5333dbf021 📝 docs(config.yaml): add PyPDFDirectoryLoader documentation link
Added the documentation link for the PyPDFDirectoryLoader in the config.yaml file. This allows users to access the documentation on how to use the PyPDFDirectoryLoader for loading PDF documents.
2023-07-01 17:09:35 -03:00
Gabriel Luiz Freitas Almeida
30c9b4f5a9 🔧 chore(base.py): add debug logs when creating and creating database and tables
The logger.debug() statements are added to provide more visibility into the process of creating the database and tables. This can be helpful for debugging and troubleshooting purposes.
2023-07-01 17:09:26 -03:00
Gabriel Luiz Freitas Almeida
4c8c3528de 🔥 refactor(settings.py): remove commented out code for setting default database URL
The commented out code was unnecessary and cluttered the codebase. Removing it improves readability and maintainability of the code.
2023-07-01 17:09:15 -03:00
Gabriel Luiz Freitas Almeida
94cd8703b3 🐛 fix(App.tsx): improve code readability by formatting long conditional statements
The conditional statements in the useEffect hook were formatted to improve code readability. By breaking the statements into multiple lines and adding proper indentation, it is easier to understand the logic. This change does not affect the functionality of the code.
2023-07-01 17:09:04 -03:00
Gabriel Luiz Freitas Almeida
3506cb1311 🐛 fix(chatModal): refactor error handling in WebSocket connection to improve readability and error handling
The error handling in the WebSocket connection has been refactored to improve readability and error handling. Instead of nesting the `getHealth()` promise inside the `onerror` callback, it has been extracted to a separate `.then()` block. This allows for better separation of concerns and makes the code more readable. Additionally, the error handling logic has been updated to properly set the `setErrorData` state when the backend fails to respond.
2023-07-01 17:08:47 -03:00
Gabriel Luiz Freitas Almeida
e5eea2d9fb 🐛 fix(__main__.py): change logger.error to logger.exception to log full exception traceback
The change is made to improve the logging of exceptions. Using logger.exception instead of logger.error allows the logger to log the full traceback of the exception, providing more detailed information for debugging purposes.
2023-07-01 17:08:28 -03:00
Gabriel Luiz Freitas Almeida
d2609141ba 🔧 refactor(documentloaders.py): extract build_directory_loader_fields() function to improve code readability and maintainability
🔧 refactor(documentloaders.py): remove redundant code for adding fields in DocumentLoaderFrontNode class
The code in the DocumentLoaderFrontNode class has been refactored to extract the logic for building directory loader fields into a separate function called build_directory_loader_fields(). This improves code readability and maintainability by separating concerns and reducing duplication. The redundant code for adding fields in the DocumentLoaderFrontNode class has also been removed.
2023-07-01 17:08:23 -03:00
Cristhian Zanforlin Lousa
0b79aa023f 🐛 fix(constants.tsx): remove unnecessary focus:visible:outline-none class from INPUT_STYLE to fix styling issue 2023-07-01 13:16:31 -03:00
Gabriel Luiz Freitas Almeida
f046b303a9 Merge branch 'release' of https://github.com/logspace-ai/langflow into release 2023-07-01 10:02:10 -03:00
Gabriel Luiz Freitas Almeida
bbec95ff13 refactor: 🎨 added new names and descriptions, moved that to separate file 2023-07-01 09:58:40 -03:00
Gabriel Luiz Freitas Almeida
016c9983d6 🐛 fix(vectorstores.py): change default value of "Persist" extra field to False
The default value of the "Persist" extra field in the VectorStoreFrontendNode class has been changed from True to False. This change was made to align the default value with the desired behavior of the application.
2023-07-01 09:43:30 -03:00
Gabriel Luiz Freitas Almeida
e04eb0fd7e 🐛 fix(memories.py): add condition to only add output_key field if template type is not VectorStoreRetrieverMemory
The output_key field is now only added to the template if the template type is not VectorStoreRetrieverMemory. This ensures that the output_key field is not added unnecessarily for templates of this type.
2023-07-01 09:43:17 -03:00
Gabriel Luiz Freitas Almeida
2635f06a06 🐛 fix(base.py): add exception logging to improve error handling and debugging
The `logger.exception(exc)` line has been added to log the exception that occurred. This will help with error handling and debugging by providing more information about the exception that caused the error.
2023-07-01 09:43:02 -03:00
Gabriel Luiz Freitas Almeida
d39bea6e85 🐛 fix(loading.py): convert retriever to retriever object if it has "as_retriever" method
The code now checks if the "retriever" key exists in the params dictionary and if the value has an "as_retriever" method. If it does, the value is replaced with the result of calling the "as_retriever" method. This change ensures that the "retriever" parameter is always an instance of the retriever object, preventing potential attribute errors later in the code.
2023-07-01 09:42:44 -03:00
Gabriel Luiz Freitas Almeida
45dfa30851 🐛 fix(run.py): refactor updating memory keys logic to use a loop and try-except block
The logic for updating memory keys in the `run.py` file has been refactored to use a loop and a try-except block. Instead of individually assigning values to `input_key`, `output_key`, and `memory_key`, the keys and attributes are now stored in lists. The loop iterates over the lists and attempts to set the attribute values using `setattr()`. If an attribute does not exist, a `ValueError` is caught and a debug log message is printed. This refactoring improves code readability and maintainability.
2023-07-01 09:42:29 -03:00
Cristhian Zanforlin Lousa
5916a76d0d formatting code 2023-06-30 20:24:19 -03:00
Cristhian Zanforlin Lousa
f6b5f720f6 🔧 fix(codeAreaComponent): update import statement for INPUT_STYLE constant to include additional constants for input dialog and input disable
🔧 fix(dropdownComponent): update import statement for INPUT_STYLE constant to include additional constant for input edit node
🔧 fix(floatComponent): update import statement for INPUT_STYLE constant to include additional constants for input disable and input edit node
🔧 fix(inputComponent): update import statement for INPUT_STYLE constant to include additional constants for input disable and input edit node
🔧 fix(inputFileComponent): update import statement for INPUT_STYLE constant to include additional constants for input disable and input edit node
🔧 fix(inputListComponent): update import statement for INPUT_STYLE constant to include additional constants for input disable and input edit node

🐛 fix(intComponent): add INPUT_DISABLE constant to disable input when disabled prop is true
🐛 fix(promptComponent): add INPUT_DISABLE constant to disable input when disabled prop is true
🐛 fix(textAreaComponent): add INPUT_DISABLE constant to disable input when disabled prop is true
🐛 fix(extraSidebarComponent): change INPUT_STYLE to INPUT_SEARCH for search input styling
 feat(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics
 feat(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port
2023-06-30 20:17:30 -03:00
Gabriel Luiz Freitas Almeida
766e766913 🐛 fix(vectorstores.py): set 'value' of 'persist_directory' field to False to disable persistence
The 'value' of the 'persist_directory' field is set to False to disable persistence. This change ensures that the 'persist_directory' field is not shown and the value is not set to True by default.
2023-06-30 18:11:43 -03:00
Gabriel Luiz Freitas Almeida
1a9f69ef60 🔧 chore(vectorstores.py): set persist_directory field value to False
The persist_directory field in the VectorStoreFrontendNode class is now set to False. This change was made to disable the persistence of the directory.
2023-06-30 18:10:36 -03:00
Rodrigo Nader
295f08f2b3 refactor: Update component styles
- Simplify component styles for codeAreaComponent, dropdownComponent, floatComponent, inputComponent, inputFileComponent, intComponent, promptComponent, and textAreaComponent.
- Remove unnecessary classes and styling.
- Improve overall readability and maintainability of the code.
2023-06-30 18:07:10 -03:00
anovazzi1
1dc54dda02 Merge branch 'release' into merge-release 2023-06-30 17:49:24 -03:00
anovazzi1
0eab19190f fix(extraSidebarComponent): change background color class from "bg-white" to "bg-background" for better consistency and readability 2023-06-30 17:38:59 -03:00
anovazzi1
0e111f92a8 fix(dropdownComponent): update classNames in Dropdown component to use consistent background color
The classNames in the Dropdown component were updated to use the consistent background color "bg-background" instead of "bg-white" to improve visual consistency and maintain a unified design across the application.
2023-06-30 17:34:28 -03:00
anovazzi1
369a4a59ca feat(tabsContext.tsx): add support for flow name and description in downloadFlow function to customize downloaded file name and content
fix(exportModal/index.tsx): update downloadFlow function calls to include flow name and description parameters
fix(types/tabs/index.ts): update downloadFlow function signature to include flow name and description parameters
2023-06-30 17:29:41 -03:00
Cristhian Zanforlin Lousa
51f1323610 🐛 fix(promptComponent): remove unnecessary gap-3 class from prompt component to fix alignment issue
🐛 fix(textAreaComponent): remove unnecessary flex class from text area component to fix alignment issue
2023-06-30 17:23:05 -03:00
anovazzi1
c544591f33 fix(GenericNode/index.tsx): fix CSS class name for validation status to use "bg-status-green" instead of "bg-status-red" to reflect correct status color 2023-06-30 17:12:39 -03:00
anovazzi1
36669cd64f
fix web socket bug that display empty error (#578)
This pull request addresses a bug related to WebSocket functionality
that was causing an empty error to be displayed. The bug resulted in
incorrect error-handling behavior within the WebSocket implementation,
leading to confusion and difficulties in identifying and resolving
issues.

By addressing this bug and improving the WebSocket error handling
mechanism, this pull request significantly enhances the overall
stability and reliability of the application.
2023-06-30 16:56:11 -03:00
Gabriel Luiz Freitas Almeida
8f66ea7088 🐛 fix(loading.py): add missing return statement to instantiate_llm function
The missing return statement caused the function to not return any value when the node_type is not "VertexAI". Adding the return statement ensures that the function returns the instantiated class object with the provided parameters in all cases.
2023-06-30 16:47:59 -03:00
anovazzi1
e9b44ac781 fix(chat.py): add comment explaining the behavior of accepting and immediately closing the connection if the flow is not built yet 2023-06-30 16:42:33 -03:00
Gabriel Luiz Freitas Almeida
55b17543ae feat(icons): add VertexAIIcon component and update nodeIconsLucide to include VertexAI and ChatVertexAI icons
The VertexAIIcon component is added to the icons directory, allowing the usage of the Vertex AI icon in the application. The nodeIconsLucide object in the utils.ts file is updated to include the VertexAI and ChatVertexAI icons, enabling their usage in the application. This addition enhances the visual representation of the application by providing new icons related to Vertex AI functionality.
2023-06-30 16:40:58 -03:00
anovazzi1
d46aeb2efa fix(chat.py): accept websocket connection before closing it with an error code and reason 2023-06-30 16:27:45 -03:00
anovazzi1
66b4bce525 fix(App.tsx): prevent duplicate alerts from being added to the alertsList
fix(alertContext.tsx): set the error, notice, and success data states before opening the respective alerts
feat(chatModal/index.tsx): add error handling for websocket connection and check backend health before reconnecting
2023-06-30 16:21:40 -03:00
Cristhian Zanforlin Lousa
f9e1b61ec2 🔧 chore(GenericNode/index.tsx): remove unnecessary class and reduce code duplication in GenericNode component
🔧 chore(GenericNode/index.tsx): remove unnecessary gap-2 class from the text container in GenericNode component
2023-06-30 15:48:51 -03:00
Gabriel Luiz Freitas Almeida
1689eb0be4 🔧 fix(llm.py): ignore type error for service_account import
🔧 fix(loading.py): remove empty lines
The type error for the service_account import in llm.py is ignored to prevent a linting error. In loading.py, empty lines were removed for code cleanliness.
2023-06-30 15:40:36 -03:00
Cristhian Zanforlin Lousa
0e3c137315 🎨 style(ApiModal/index.tsx): update button styling to include hover effect on text color 2023-06-30 15:38:06 -03:00
Gabriel Luiz Freitas Almeida
cbfc9cb405 Merge branch 'release' into vertex_ai 2023-06-30 15:37:43 -03:00
Cristhian Zanforlin Lousa
838c18d6c9 🎨 style(GenericNode): update hover text color to accent foreground color for better visibility
🎨 style(singleAlertComponent): update hover text color to accent foreground color for better visibility
🎨 style(notice): update hover text color to accent foreground color for better visibility
🎨 style(ExtraSidebarComponent): update hover text color to accent foreground color for better visibility
🎨 style(codeAreaComponent): update hover text color to accent foreground color for better visibility
🎨 style(headerComponent): update hover text color to accent foreground color for better visibility
🎨 style(inputFileComponent): update hover text color to accent foreground color for better visibility
🎨 style(inputListComponent): update hover text color to accent foreground color for better visibility
🎨 style(promptComponent): update hover text color to accent foreground color for better visibility
🎨 style(textAreaComponent): update hover text color to accent foreground color for better visibility
🎨 style(NodeModal): update hover text color to accent foreground color for better visibility
🎨 style(promptModal): update hover text color to accent foreground color for better visibility

🎨 style(textAreaModal/index.tsx): update button text color class to 'text-accent-foreground' for better visibility on hover
2023-06-30 14:49:26 -03:00
Cristhian Zanforlin Lousa
9db91f6099 🐛 fix(GenericNode/index.tsx): remove unnecessary whitespace in hover class to fix styling issue
🐛 fix(button.tsx): add dark mode styling for primary button variant to ensure consistent styling in both light and dark mode
2023-06-30 14:34:22 -03:00
Cristhian Zanforlin Lousa
73023f43d6 formatting documents 2023-06-30 13:50:21 -03:00