Commit graph

11,619 commits

Author SHA1 Message Date
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
Gabriel Luiz Freitas Almeida
26038d0837 🔧 chore(formModal): remove unnecessary line break and indentation in JSX code
The line break and indentation in the JSX code for the "Name" label were removed to improve code readability and reduce unnecessary code.
2023-07-01 09:22:51 -03:00
Lucas Oliveira
ccfe766e40 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-30 20:52:25 -03:00
Lucas Oliveira
5611eafa63 🐛 fix(formModal): change variable name from chatValue to value for clarity and consistency 2023-06-30 20:51:02 -03:00
Lucas Oliveira
9180d607d0 🔧 fix(formModal/index.tsx): adjust styling of form modal to improve alignment and spacing 2023-06-30 20:43:30 -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
47f9d78a86 🐛 fix(utils.py): add condition to check if langchain_object.prompt has a template attribute before adding it to input_keys_response
The code now checks if the langchain_object.prompt has a template attribute before adding it to the input_keys_response. This prevents potential errors if the template attribute is not present in the prompt object.
2023-06-30 18:27:56 -03:00
Gabriel Luiz Freitas Almeida
32d0cc9092 🔨 refactor(formModal/index.tsx): remove unused imports and clean up code formatting
The commit removes unused imports and cleans up the code formatting in the formModal/index.tsx file. This improves code readability and reduces unnecessary clutter.
2023-06-30 18:27:47 -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
Gabriel Luiz Freitas Almeida
37025bdf82 🔀 chore(pyproject.toml): update fastapi version to 0.99.0
The fastapi dependency version has been updated to 0.99.0 to ensure compatibility with the latest features and bug fixes provided by the FastAPI framework.
2023-06-30 18:09:13 -03:00
Gabriel Luiz Freitas Almeida
109283b6d0 🔧 chore(base.py): add method to remove unwanted base classes from the list of base classes
The `process_base_classes` method is added to the `FrontendNode` class. This method removes unwanted base classes specified in the `CLASSES_TO_REMOVE` list from the `base_classes` list. This ensures that only the desired base classes are included in the `base_classes` list. The method is then called in the `to_dict` method to ensure that the processed `base_classes` list is used when converting the `FrontendNode` instance to a dictionary.
2023-06-30 18:09:02 -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
Gabriel Luiz Freitas Almeida
26b34e6ed1 🔒 chore(poetry.lock): update langchainplus-sdk version to 0.0.18
The langchainplus-sdk package has been updated to version 0.0.18. This update includes bug fixes and improvements to the client library for connecting to the LangSmith LLM Tracing and Evaluation Platform.
2023-06-30 17:34:55 -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
Gabriel Luiz Freitas Almeida
0df81bfa79
🔖 chore(pyproject.toml): update package version to 0.2.8 (#579) 2023-06-30 17:30:02 -03:00
Gabriel Luiz Freitas Almeida
d62f8cb5a1
Merge branch 'main' into release 2023-06-30 17:29:48 -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
Gabriel Luiz Freitas Almeida
534927e5fa 🔒 chore(test_graph.py): comment out complex graph test case to improve test performance
🔒 chore(test_graph.py): comment out the complex graph test case to improve the performance of the test suite. The complex graph test case is currently not passing and is causing unnecessary delays in the test execution.
2023-06-30 17:29:08 -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
Gabriel Luiz Freitas Almeida
d96a2d70ac 🔧 chore(test_websocket.py): remove unnecessary commented out code and update websocket test input
The commented out code was not needed and was cluttering the test file. The test input for the websocket was updated to use a more descriptive key name "input" instead of "type" to improve clarity and readability.
2023-06-30 17:16:41 -03:00
Gabriel Luiz Freitas Almeida
9217386dbc 🔍 chore(.gitignore): add langchain.db to the list of ignored files
The file `langchain.db` is now added to the list of ignored files in the `.gitignore` file. This ensures that the `langchain.db` file is not tracked by Git and will not be included in future commits.
2023-06-30 17:12:54 -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
Gabriel Luiz Freitas Almeida
8088565768 🔥 refactor(test_chains_template.py): remove unused import of Serializable
The import of the Serializable class is no longer needed in the test_chains_template.py file, so it has been removed to improve code cleanliness and remove unnecessary dependencies.
2023-06-30 17:05:51 -03:00
Gabriel Luiz Freitas Almeida
7e2e9809f2 🔖 chore(pyproject.toml): update package version to 0.2.8
The package version has been updated from 0.2.7 to 0.2.8. This change is made to reflect the latest changes and improvements in the package.
2023-06-30 17:05:02 -03:00
anovazzi1
98ed719053
Added VertexAI and fixed a bug in the websocket (#576)
Issue #290
2023-06-30 16:58:58 -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
Lucas Oliveira
20d6db5d4e 🎨 style(formModal/index.tsx): improve code formatting and consistency in the FormModal component
- Adjust indentation and spacing for better readability
- Change font weight of text elements to improve visual hierarchy
- Add left margin to the Variable component to align it properly

No functional changes were made.
2023-06-30 16:25:41 -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
Lucas Oliveira
2f4426d49f 🚀 feat(cardComponent): add dialog component for confirmation before deleting a card
🚀 feat(formModal): increase font size of input variables section title for better readability
2023-06-30 16:03:44 -03:00
Gabriel Luiz Freitas Almeida
2fd755eb0d
Merge branch 'main' into release 2023-06-30 15:52:16 -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
e713c02359
feat: adding VertexAI (#555)
VertexAI was added but ChatVertexAI was not because there's a possible bug.
2023-06-30 15:48:31 -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
gustavoschaedler
895bc202a9 Refactor custom component code structure in endpoints.py and customs.py
- Refactored the import statements for custom components in `endpoints.py` to use the newly created `CustomComponent` class instead of the previous implementation.
- Removed unnecessary import statements for custom components in `endpoints.py`.
- Added support for a new `CustomComponentVertex` type in the `VERTEX_TYPE_MAP` dictionary in `constants.py`.
- Modified the `PromptVertex` class in `types.py` to handle input variables from prompt text more efficiently.
- Added a new `CustomComponentVertex` class in `types.py` for custom component vertices.
- Renamed the `CustomComponent` class in `custom.py` to `CustomComponent_old`.
- Created a new `CustomComponent` class in `custom.py` to replace the previous implementation.
2023-06-30 19:32:09 +01: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
Cristhian Zanforlin Lousa
168a1b9e0f merging branch release into dev 2023-06-30 13:49:49 -03:00
Cristhian Zanforlin Lousa
806767f962 🐛 fix(buildTrigger): add strokeWidth prop to Zap icon to fix inconsistent stroke width
🐛 fix(codeAreaComponent): add strokeWidth prop to ExternalLink icon to fix inconsistent stroke width
🐛 fix(headerComponent): add hover effect to Twitter and Discord icons by adding hover:text-ring class
🐛 fix(inputFileComponent): add strokeWidth prop to FileSearch2 icon to fix inconsistent stroke width
🐛 fix(promptComponent): add strokeWidth prop to ExternalLink icon to fix inconsistent stroke width
🐛 fix(textAreaComponent): add strokeWidth prop to ExternalLink icon to fix inconsistent stroke width
🐛 fix(ApiModal): add strokeWidth prop to Code2 icon to fix inconsistent stroke width
🐛 fix(codeAreaModal): add strokeWidth prop to TerminalSquare icon to fix inconsistent stroke width
🐛 fix(exportModal): add strokeWidth prop to Download icon to fix inconsistent stroke width
🐛 fix(genericModal): add strokeWidth prop to FileText icon to fix inconsistent stroke width
🐛 fix(importModal): add strokeWidth prop to DocumentDuplicateIcon icon to fix inconsistent stroke width
2023-06-30 13:23:22 -03:00