Commit graph

5,500 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
ac9969624e 🐛 fix(loading.py): remove empty input_key and output_key from params dictionary
The code now removes the "input_key" and "output_key" keys from the params dictionary if they are empty strings. This ensures that the dictionary does not contain unnecessary keys with empty values.
2023-07-06 15:33:56 -03:00
Gabriel Luiz Freitas Almeida
7b238b44e7 🔀 chore(base.py): update _built_object_repr method to include emojis and more descriptive messages
The _built_object_repr method in the Vertex class has been updated to include emojis and more descriptive messages. The message "Built successfully " is now returned when the _built_object attribute is True, indicating that the object has been successfully built. On the other hand, the message "Failed to build 😵‍💫" is returned when the _built_object attribute is False, indicating that the object failed to build. This change improves the clarity and visual representation of the build status.
2023-07-06 15:33:56 -03:00
Gabriel Luiz Freitas Almeida
d31fe77d55 🐛 fix(utils.py): remove unnecessary or operator in process_graph function call
The unnecessary or operator in the process_graph function call has been removed. The chat_inputs.message parameter is now passed directly to the get_result_and_steps function.
2023-07-06 15:33:55 -03:00
Gabriel Luiz Freitas Almeida
c3886ed219 🐛 fix(base.py): change wrong_variables from a set to a list to preserve order and improve error message generation
🔀 refactor(base.py): refactor check_input_variables function to simplify logic and improve readability
The wrong_variables variable is now a list instead of a set to preserve the order of the variables. This change improves the error message generation by ensuring that the variables are displayed in the same order as they appear in the input. The check_input_variables function has been refactored to simplify the logic and improve readability. The code now handles invalid characters and wrong variables separately, making it easier to understand and maintain.
2023-07-06 15:33:54 -03:00
Gabriel Luiz Freitas Almeida
56b23c4a1d 🔧 chore(types.py): add missing return statement in _built_object_repr method of PromptVertex
📝 docs(types.py): improve readability and add clarity to the _built_object_repr method of PromptVertex
The _built_object_repr method of PromptVertex was missing a return statement when the condition in the if statement was not met. This commit adds the missing return statement to ensure the method always returns a value. Additionally, the commit improves the documentation of the method to provide better readability and clarity.
2023-07-06 15:33:53 -03:00
Gabriel Luiz Freitas Almeida
049a41d25e 🔥 refactor(GenericNode/index.tsx): remove unnecessary console.log statement
🔥 refactor(buildTrigger/index.tsx): remove unnecessary console.log statement
The console.log statements were removed as they were no longer needed and were cluttering the code.
2023-07-06 15:33:52 -03:00
Lucas Oliveira
be26ed9979 🔥 refactor(textAreaModal/index.tsx): remove unused imports and code, simplify component structure for better readability and maintainability 2023-07-06 15:32:39 -03:00
Lucas Oliveira
5dc73b41b6 🐛 fix(genericModal/index.tsx): move setValue(inputValue) before the switch statement to ensure proper value assignment 2023-07-06 15:28:54 -03:00
Lucas Oliveira
798be36cd8 🐛 fix(genericModal/index.tsx): change validatePrompt function call to setIsEdit to fix incorrect behavior when blurring input field 2023-07-06 15:27:36 -03:00
Lucas Oliveira
5d417fc11d Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-07-06 15:13:05 -03:00
Lucas Oliveira
01ecf37893 🐛 fix(genericModal/index.tsx): remove redundant setValue call to fix a bug where the value was being set twice
🐛 fix(textAreaModal/index.tsx): remove redundant setValue call to fix a bug where the value was being set twice
2023-07-06 15:09:19 -03:00
anovazzi1
a046e3a141 chore(index.css): remove border-1 class from dropdown-component-outline to fix styling issue 2023-07-06 11:56:32 -03:00
anovazzi1
8f1b188775
Add modals tailwind constants (#620)
Improves code verbosity and organization of Tailwind classes.
2023-07-06 11:51:47 -03:00
anovazzi1
d3b2c905d9 Merge branch 'dev' into tailwind-modal-constants 2023-07-06 11:51:28 -03:00
Igor Carvalho
2a546b69c2 refactor: big tailwind class into smaller classes 2023-07-06 11:23:12 -03:00
Igor Carvalho
7fc86a52af feat: Add modals tailwind constants 2023-07-06 11:14:48 -03:00
Gabriel Luiz Freitas Almeida
c038247dcf
feat: Customize DB path for JCloud app (#619) 2023-07-06 10:31:25 -03:00
Gabriel Luiz Freitas Almeida
c5b5905a6a
Fix port issue in deploy_langflow_gcp_spot.sh (#617) 2023-07-06 10:30:44 -03:00
Gabriel Luiz Freitas Almeida
86de1ac480
Implementing Prompt Modal with Variables (#616) 2023-07-06 10:29:19 -03:00
Ikko Eltociear Ashimine
c609c19a75 🐛 fix(utils.ts): fix typo in utils.ts 2023-07-06 22:28:37 +09:00
Gabriel Luiz Freitas Almeida
7951ccfc77 🐛 fix(base.py): fix logic for checking and fixing input variables in check_input_variables function
🔍 refactor(base.py): refactor build_error_message function to improve readability and error message generation

The check_input_variables function now correctly handles empty variables and variables that start with a number. It removes invalid characters from the variables and adds them to the wrong_variables set. The build_error_message function has been refactored to generate a more informative error message, including details about invalid characters, wrong variables, empty variables, and duplicate variables. This improves the clarity of error messages when validating input variables.
2023-07-06 10:27:26 -03:00
Zac Li
6eea2d8d58 feat: Customize DB path for JCloud app 2023-07-06 17:00:21 +08:00
Ri
002db8bbb4
Update GCP_DEPLOYMENT.md correct url for opening spot 2023-07-06 04:16:24 -04:00
Ri
c6c86403ef
Update deploy_langflow_gcp_spot.sh 2023-07-06 04:14:54 -04:00
Lucas Oliveira
d6ec2a4713 🔧 fix(chatMessage/index.tsx): change margin-bottom class from "my-3" to "mb-3" and add margin-top class "mt-1" to improve spacing and alignment of chat message component 2023-07-06 01:34:37 -03:00
Lucas Oliveira
4f4e77838f 🐛 fix(accordion.tsx): remove unnecessary hover effect on AccordionTrigger to improve styling
🐛 fix(chatMessage/index.tsx): refactor chat message rendering to improve readability and remove unnecessary code
2023-07-06 01:32:36 -03:00
Lucas Oliveira
26ec9c5d85 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-07-06 00:29:37 -03:00
Lucas Oliveira
0bb664f3ad 🐛 fix(chatMessage): fix styling issue in ChatMessage component to ensure proper alignment and text wrapping
🐛 fix(chatMessage): add max height and overflow to AccordionContent in ChatMessage component to prevent content overflow
🐛 fix(formModal): adjust width of left panel in FormModal component to improve layout
🐛 fix(formModal): fix flexbox alignment issue in right panel of FormModal component
2023-07-06 00:29:05 -03:00
gustavoschaedler
38da799224 Add langchain imports and format error detail message
- Import new modules for langchain functionality
- Format error detail message for better readability and organization
2023-07-06 01:05:56 +01:00
gustavoschaedler
11cece92b8 Refactor code for CustomComponent class
- Refactored code to replace the deprecated is_valid property with the is_check_valid method.
- Added validation for the entrypoint function name and return type.
- Modified the error messages to provide more specific details.

This commit implements the necessary changes to refactor the CustomComponent class in the endpoints.py file. The is_valid property has been replaced with the is_check_valid method to check the validity of the custom component. Additionally, validation has been added to ensure the presence of a valid entrypoint function and a valid return type. If any of the validation checks fail, appropriate error messages are raised to provide detailed traceback information.
2023-07-06 01:02:34 +01:00
anovazzi1
5c6f35b4ac
Add generic node tailwind constants classes (#614)
Improves code verbosity and organization of Tailwind classes.
2023-07-05 21:01:04 -03:00
anovazzi1
8b35b4b44e Merge branch 'dev' into tailwind-constants 2023-07-05 20:57:16 -03:00
Gabriel Luiz Freitas Almeida
a8900c429d 🔧 chore(base.py): improve the representation of the built object in the Vertex class
The representation of the built object in the Vertex class has been improved to provide more meaningful information. Instead of returning the actual object representation, it now returns "Built successfully" if the object has been built, or "Not built yet" if the object has not been built yet. This change enhances the clarity and readability of the code.
2023-07-05 20:35:39 -03:00
Lucas Oliveira
ed17a621af Changed chat history to contain all keys unformatted, added accordion with all keys 2023-07-05 20:25:49 -03:00
Gabriel Luiz Freitas Almeida
9926edbbbf Merge remote-tracking branch 'origin/main' into dev 2023-07-05 20:24:02 -03:00
gustavoschaedler
f92fefba46 Refactor code for CustomComponent class and build_langchain_template_custom_component function
The code in the CustomComponent class has been refactored to improve readability and maintainability. The `_handle_function` method now handles function arguments correctly. Additionally, the `is_valid_class_template` method has been renamed to `_class_template_validation`, and it now raises an HTTPException with a detailed error message when the main class or the build function contains invalid information.

In the `build_langchain_template_custom_component` function, base classes are now retrieved from the `return_type` and added to the `template.base_classes` list. A try-except block is used to handle possible KeyError or AttributeError exceptions, and an HTTPException is raised with the corresponding error message and traceback if an error occurs.

These changes ensure more accurate validation and handle potential errors more gracefully.
2023-07-06 00:21:35 +01:00
Gabriel Luiz Freitas Almeida
0f97dfe678 Formatting 2023-07-05 20:18:04 -03:00
Gabriel Luiz Freitas Almeida
cd879912fe
Release (#615) 2023-07-05 20:13:05 -03:00
Gabriel Luiz Freitas Almeida
f84cd4026a 🐛 fix(validate.py): set the value of the template field to an empty string
The value of the template field is now set to an empty string to ensure consistency and avoid potential issues with undefined values.
2023-07-05 20:09:11 -03:00
Gabriel Luiz Freitas Almeida
605f7cecb2 🐛 fix(chat.py): handle case when artifacts is empty to prevent potential error
The code now handles the case when the `artifacts` variable is empty by setting `input_keys_response` to an empty dictionary. This prevents potential errors that could occur when trying to build the `input_keys_response` object.
2023-07-05 20:06:27 -03:00
anovazzi1
c9a2ba5821 fix(codeAreaComponent): add key prop to CodeAreaModal component to fix React warning
feat(baseModal): create a reusable BaseModal component to be used in different modals
fix(codeAreaModal): add missing imports and fix indentation in CodeAreaModal component
refactor(codeAreaModal): refactor handleClick function to handle dynamic and non-dynamic code validation and execution
refactor(codeAreaModal): refactor useEffect to update value prop when code state changes
2023-07-05 19:59:08 -03:00
Igor Carvalho
9d6d2fd88a feat: add header and input component tailwind constant classes 2023-07-05 19:54:10 -03:00
Lucas Oliveira
100419833f 🐛 fix(chatTrigger): update className condition to disable chat trigger button when isBuilt is false or canOpen is false 2023-07-05 19:40:52 -03:00
Lucas Oliveira
9f24f7830c 🐛 fix(codeAreaComponent): adjust classNames to fix styling issues and improve readability
🐛 fix(promptComponent): adjust classNames to fix styling issues and improve readability
🐛 fix(textAreaComponent): adjust classNames to fix styling issues and improve readability
2023-07-05 19:30:48 -03:00
Igor Carvalho
cbda5fc146 fix: commit saving error 2023-07-05 19:09:15 -03:00
Igor Carvalho
dccb9c27db feat: Add CodeArea and Dropdown component tailwind constant classes 2023-07-05 19:08:33 -03:00
Igor Carvalho
d0621efd1c feat: Add card component and unused extrasidebar tailwind constants classes 2023-07-05 18:13:32 -03:00
anovazzi1
6391cfd671 Merge branch 'python_custom_node_component' of personal:logspace-ai/langflow into python_custom_node_component 2023-07-05 18:01:27 -03:00
anovazzi1
f6f471cc53 fix(codeAreaComponent): update import path for CodeAreaModal to use v2 version
fix(codeAreaModal/v2): set open prop to true in TwoColumnsModal component
fix(twoColumnsModal): add missing import statement for PopUpContext
refactor(twoColumnsModal): remove unused code and add logic to close modal and reset state when modal is closed
2023-07-05 18:01:16 -03:00
anovazzi1
27776f473f subcomponents with type assertion 2023-07-05 17:49:44 -03:00