Commit graph

6,039 commits

Author SHA1 Message Date
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
Lucas Oliveira
78a069d7ad Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-30 12:54:28 -03:00
Lucas Oliveira
61e87a6d54 🐛 fix(switch.tsx): add aria-disabled attribute to the Switch component to improve accessibility
🎨 style(switch.tsx): update class names in the Switch component to improve readability and maintainability
2023-06-30 12:54:07 -03:00
gustavoschaedler
6416c43ff2 Merge remote-tracking branch 'origin/form_io' into python_custom_node_component 2023-06-30 16:44:11 +01:00
Gabriel Luiz Freitas Almeida
356c76b1b2 feat(constants.tsx): update DESCRIPTIONS, ADJECTIVES, and NOUNS arrays with new values to enhance variety and creativity in generated text
The DESCRIPTIONS array has been updated with additional phrases to provide a wider range of options for generating text. The ADJECTIVES array has been expanded with more descriptive words to add more color and personality to the generated text. The NOUNS array has been enriched with new names to increase the diversity of possible flow names. These updates aim to enhance the quality and creativity of the generated text by providing a greater variety of options.
2023-06-30 12:01:01 -03:00
Lucas Oliveira
562bbe99ee Undo Snapshot when importing by drop 2023-06-30 11:45:36 -03:00
Lucas Oliveira
374f462f17 🔨 refactor(formModal/index.tsx): remove unused MessageSquarePlus component and adjust styling for chat input section 2023-06-30 11:35:52 -03:00
Lucas Oliveira
a13e60ed57 Fixed icon size at node changing with title size 2023-06-30 11:33:07 -03:00
Lucas Oliveira
7fddffc12e 🎨 style(formModal/index.tsx): adjust size and spacing of icons and text in FormModal component for better visual consistency
🐛 fix(formModal/index.tsx): add unique key prop to dynamically rendered elements in FormModal component to remove console warning
2023-06-30 11:28:48 -03:00
Lucas Oliveira
3937b30e16 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-30 11:25:05 -03:00
Lucas Oliveira
1aa906dbb6 Added logic to upload flow on drop 2023-06-30 11:25:00 -03:00
Gabriel Luiz Freitas Almeida
0eead8f3f7 🐛 fix(loading.py): fix condition to check for "handle_keys" in format_kwargs instead of params
The condition to check for the presence of "handle_keys" has been fixed to correctly check for its existence in the format_kwargs dictionary instead of the params dictionary. This ensures that the "handle_keys" list is properly populated when necessary.
2023-06-30 11:23:19 -03:00
Lucas Oliveira
052155bc6a Edited dragOver drop effect on dropping file, printed file dropped over the pane 2023-06-30 11:19:50 -03:00
Gabriel Luiz Freitas Almeida
270d5fb106 🐛 fix(loading.py): add missing condition to check if variable is an instance of BaseOutputParser and has "get_format_instructions" attribute
The code was missing a condition to check if the variable is an instance of BaseOutputParser and has the "get_format_instructions" attribute. This condition is necessary to properly handle the variable and avoid potential errors.
2023-06-30 11:17:32 -03:00
Gabriel Luiz Freitas Almeida
156b3cc5c2 🔧 chore(config.yaml): comment out ChatVertexAI integration due to a bug causing AttributeError
The ChatVertexAI integration is temporarily commented out due to a bug that causes an AttributeError. This bug needs to be resolved before the integration can be activated again.
2023-06-30 11:10:52 -03:00
Gabriel Luiz Freitas Almeida
06aea7da88 🔀 chore(custom_lists.py): reformat import statements for better readability and maintainability
🔀 chore(custom_lists.py): add ChatVertexAI to the import statements for better modularity and extensibility
🔀 chore(custom_lists.py): add ChatVertexAI to the llm_type_to_cls_dict for better compatibility and flexibility
🔀 chore(llms.py): change required field for credentials to be optional for better user experience
🔀 chore(llms.py): add advanced and show fields for specific fields related to VertexAI for better configurability

The import statements in `custom_lists.py` have been reformatted to improve readability and maintainability. The `ChatVertexAI` class has been added to the import statements to enhance modularity and extensibility.

The `ChatVertexAI` class has been added to the `llm_type_to_cls_dict` dictionary in `custom_lists.py` to improve compatibility and flexibility.

In `llms.py`, the `required` field for the `credentials` field has been changed to be optional for a better user experience.

The `advanced` and `show` fields have been added to specific fields related to VertexAI in `llms.py` to provide better configurability.
2023-06-30 11:09:13 -03:00
Cristhian Zanforlin Lousa
7be93653c3 🔧 fix(inputListComponent): remove unnecessary padding from input list component to improve layout
🔧 fix(tabsContext): add optional fileName parameter to downloadFlow function to allow customizing the downloaded file name
🔧 fix(exportModal): add optional fileName parameter to downloadFlow function calls to allow customizing the downloaded file name
🔧 fix(tabsContext): update downloadFlow function signature to include optional fileName parameter
2023-06-30 10:52:23 -03:00
Lucas Oliveira
fe16467914 🐛 fix(toggleShadComponent): remove unused useEffect hook to improve code readability and maintainability
 feat(toggleShadComponent): add disabled prop to Switch component to disable interaction when disabled is true

🐛 fix(formModal): remove unused imports to improve code cleanliness
 feat(formModal): add MessageSquarePlus icon to represent chat input
 feat(formModal): add multiple collapsible accordions for input variables
🐛 fix(formModal): disable Toggle component when handle key is present in formKeysData
2023-06-30 10:48:51 -03:00
Lucas Oliveira
6e5222306a Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-30 10:31:39 -03:00
Lucas Oliveira
5520ecea7a 🐛 fix(formModal/index.tsx): stop propagation of click event at the toggle component 2023-06-30 10:31:03 -03:00
Gabriel Luiz Freitas Almeida
683c69340b
Fix: Required input llm for module LLMChain not found (#566) 2023-06-30 10:10:07 -03:00
Gabriel Luiz Freitas Almeida
e01fe86caa 🐛 fix(base.py): simplify the logic to find the matched_type in the Edge class
The logic to find the matched_type in the Edge class has been simplified by removing unnecessary nested loops and using a single generator expression. This improves the readability and efficiency of the code.
2023-06-30 10:09:56 -03:00
Gabriel Luiz Freitas Almeida
3bdc35d238 🔧 chore(llm.py): add function to initialize VertexAI credentials
🔧 chore(loading.py): call initialize_vertexai function when node_type is "VertexAI"
The `llm.py` file now includes a new function `initialize_vertexai` that initializes the VertexAI credentials if a `credentials` parameter is provided. This allows for the usage of VertexAI credentials in the application. In `loading.py`, the `initialize_vertexai` function is called when the `node_type` is "VertexAI", ensuring that the VertexAI credentials are properly initialized for that specific node type.
2023-06-30 10:09:29 -03:00
Gabriel Luiz Freitas Almeida
bbf4c38740 🔀 refactor(llms.py): simplify condition for showing fields in the VertexAI class
The condition for showing fields in the VertexAI class has been simplified to exclude specific field names. This improves readability and maintainability of the code.
2023-06-30 09:35:33 -03:00
Gabriel Luiz Freitas Almeida
e8de0c60ef 🔒 chore(pyproject.toml): update python dependency version to >=3.9,<3.11 to ensure compatibility
⬆️ feat(pyproject.toml): add google-cloud-aiplatform dependency to enable integration with Google Cloud AI Platform
The python dependency version has been updated to >=3.9,<3.11 to ensure compatibility with the project. Additionally, the google-cloud-aiplatform dependency has been added to enable integration with Google Cloud AI Platform services.
2023-06-30 09:23:17 -03:00
Gabriel Luiz Freitas Almeida
4d72c92e4c 🔧 chore(llms.py): add extra fields for VertexAI template and modify field type for "credentials"
📝 chore(llms.py): improve field configuration for VertexAI template and modify field type for "credentials"
The `add_extra_fields` method is modified to add an additional field called "credentials" for the VertexAI template. The field is of type "file" and is required. It allows the user to upload a JSON file as credentials. The `format_openai_field` method is also updated to handle the new "credentials" field.
2023-06-30 09:00:18 -03:00
Gabriel Luiz Freitas Almeida
3ae84bea13 🔧 chore(validate.py): add display_name field to TemplateField in post_validate_prompt function
The display_name field is added to the TemplateField object in the post_validate_prompt function. This field allows for a more user-friendly display of the variable name in the UI.
2023-06-30 06:46:00 -03:00
Lucas Oliveira
54b5aa65da 🔨 refactor(formModal/index.tsx): organize imports and format code for better readability
 feat(formModal/index.tsx): add support for dropdown menu component and button component
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
🐛 fix(formModal/index.tsx): fix type error and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for textarea component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for toggle component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for dropdown menu component and button component
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for textarea component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for toggle component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for dropdown menu component and button component
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for textarea component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for toggle component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for dropdown menu component and button component
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code formatting
 feat(formModal/index.tsx): add support for textarea component and handle input value changes correctly
🔧 chore(formModal/index.tsx): fix indentation and spacing issues for better code
2023-06-30 00:09:34 -03:00
Lucas Oliveira
91fc931081 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-29 23:20:24 -03:00
Lucas Oliveira
9acff51555 🔧 chore(codeBlock/index.tsx): adjust className to use relative width instead of fixed width to improve responsiveness 2023-06-29 23:19:44 -03:00
Lucas Oliveira
4875098209 🐛 fix(formModal/index.tsx): fix initial value of chatValue to correctly retrieve value from tabsState
🐛 fix(formModal/index.tsx): fix initial value of chatKey to correctly retrieve key from tabsState
🐛 fix(formModal/index.tsx): fix handleOnCheckedChange to correctly set chatKey and chatValue
🐛 fix(formModal/index.tsx): fix onChange of Textarea to correctly update tabsState input_keys
 feat(formModal/index.tsx): add support for clearing input value when form is submitted
 feat(formModal/index.tsx): add support for clearing input value when form is closed
2023-06-29 23:13:29 -03:00