Commit graph

2,991 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
fbc9eb6d1b merge fix 2023-07-07 11:46:13 -03:00
Cristhian Zanforlin Lousa
5b2cc6f68a 🎨 style(inputFileComponent): add margin-left to FileSearch2 component to improve spacing
🎨 style(genericModal): add custom-scroll class to div to enable vertical scrolling
🐛 fix(genericModal): set value of inputValue before closing modal in case 1 of switch statement
🐛 fix(genericModal): fix indentation and add missing semicolon in case 2 of switch statement
2023-07-07 06:53:04 -03:00
Rodrigo Nader
7a0ab93357 refactor: Remove unused function and fix code formatting
- Removed the `postCustomComponent` function from the API controller.
- Fixed formatting issues in the `CodeAreaModal` component.
- Removed unnecessary code comments and imports.

This commit simplifies the codebase and improves readability.
2023-07-07 00:10:41 -03:00
Gabriel Luiz Freitas Almeida
961c3d94c8
General UI Fixes (#624) 2023-07-07 00:03:28 -03:00
Cristhian Zanforlin Lousa
4595d51e62 🐛 fix(parameterComponent): set disabled prop to false in TextAreaComponent to enable editing
 feat(GenericNode): import Zap icon from lucide-react to use in validation status tooltip
🐛 fix(textAreaComponent): import classNames from utils to fix missing import error
🐛 fix(constants): update HIGHLIGH_CSS constant to add overflow-y-hidden and max-w-[75vw] classes
🐛 fix(ApiModal): add condition to check if tweak.current exists before calling startTweaks()
 feat(ApiModal): import Variable icon from lucide-react to use in input variables section
🐛 fix(genericModal): import Variable icon from lucide-react to use in input variables section
🐛 fix(utils): add newline character to INVALID_CHARACTERS array
🐛 fix(tailwind.config.js): set height property to "8px" for scrollbar in custom-scroll class
2023-07-06 21:38:42 -03:00
Gabriel Luiz Freitas Almeida
0b727f8b94
Update GCP_DEPLOYMENT.md correct url for opening spot (#618) 2023-07-06 17:38:40 -03:00
Gabriel Luiz Freitas Almeida
6675592737 🔧 refactor(base.py): remove unnecessary condition in get_signature method
The condition `name in settings.<type>` is removed from the `get_signature` method in the `base.py` files of the `agents`, `chains`, `memories`, and `prompts` modules. This condition was unnecessary as it was already checked in the `get_custom_nodes` function. Removing this condition simplifies the code and improves readability.
2023-07-06 17:35:25 -03:00
Gabriel Luiz Freitas Almeida
116c600d95 🐛 fix(base.py): add check for name in settings to prevent accessing non-existent keys
The code now checks if the name is present in the settings before accessing the corresponding keys in the get_custom_nodes function. This prevents accessing non-existent keys and avoids potential errors.
2023-07-06 17:27:55 -03:00
Gabriel Luiz Freitas Almeida
44943d225a 🔥 refactor(customs.py): comment out unused ZeroShotPrompt in CUSTOM_NODES dictionary
The ZeroShotPrompt node in the CUSTOM_NODES dictionary is currently not being used and commented out for clarity and to improve code readability.
2023-07-06 17:21:03 -03:00
Gabriel Luiz Freitas Almeida
8cba8514c4 🐛 fix(agents.py): change type annotation of name parameter in format_field method to Optional[str] for better clarity
The type annotation of the name parameter in the format_field method has been changed to Optional[str] to indicate that it can be either a string or None. This change improves the clarity of the code and makes it easier to understand the expected input for the method.
2023-07-06 17:19:01 -03:00
Lucas Oliveira
7645e24796 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-07-06 17:17:26 -03:00
Lucas Oliveira
409c8e4ab2 🔧 fix(chatMessage): import Badge component to use in ChatMessage component
 feat(chatMessage): add support for displaying variables in bold inside curly braces in the chat message

🔧 fix(formModal): add support for template in chat history when adding a new chat message

🔧 fix(genericModal): remove redundant state for modal open/close

🔧 fix(genericModal): remove redundant state for modal open/close

🔧 fix(chat): add support for template in ChatMessageType

🔧 fix(tabs): add support for template in TabsState
2023-07-06 17:15:31 -03:00
Gabriel Luiz Freitas Almeida
afa1c17379 🔗 docs(config.yaml): update documentation links for PromptTemplate and CharacterTextSplitter
The documentation links for PromptTemplate and CharacterTextSplitter have been updated to the correct URLs. This ensures that users can access the relevant documentation for these components.
2023-07-06 17:11:26 -03:00
Gabriel Luiz Freitas Almeida
ee2278c37e 🚀 feat(base.py): add pydantic BaseModel as a base class for FieldFormatter to enable data validation and serialization
The FieldFormatter class now inherits from pydantic.BaseModel in addition to ABC (Abstract Base Class). This change allows FieldFormatter instances to benefit from the data validation and serialization capabilities provided by pydantic, improving the reliability and maintainability of the code.
2023-07-06 17:11:05 -03:00
Gabriel Luiz Freitas Almeida
86bbdb0c30 🐛 fix(tools.py): add "BaseTool" to the base_classes list to inherit from the correct parent class
The "base_classes" list in the ToolNode class has been updated to include "BaseTool" in addition to "Tool". This ensures that the ToolNode class correctly inherits from the BaseTool class, which is the intended parent class for this node.
2023-07-06 17:10:26 -03:00
Gabriel Luiz Freitas Almeida
e36027b679 🔀 chore(base.py): add "BaseTool" to the base_classes list in get_signature method
The "BaseTool" class is added to the base_classes list in the get_signature method. This change ensures that the "BaseTool" class is considered as one of the base classes when creating a tool's signature.
2023-07-06 17:10:06 -03:00
Gabriel Luiz Freitas Almeida
9094876ed3 feat(agents/base.py): add support for creating frontend nodes for agents
🔧 fix(agents/base.py): import missing AgentFrontendNode class from langflow.template.frontend_node.agents
🔧 fix(initialize/loading.py): pass node_type to instantiate_agent function to handle creation of frontend nodes for agents
🔧 fix(template/frontend_node/agents.py): add format_field method to AgentFrontendNode class to customize field behavior
The missing import statement for the AgentFrontendNode class from langflow.template.frontend_node.agents has been added to the base.py file. Support for creating frontend nodes for agents has been added to the AgentCreator class in the base.py file. The instantiate_agent function in the loading.py file now receives the node_type parameter to handle the creation of frontend nodes for agents. The AgentFrontendNode class in the agents.py file now includes a format_field method to customize the behavior of certain fields.
2023-07-06 17:09:18 -03:00
Gabriel Luiz Freitas Almeida
9f80af8f83 🐛 fix(types.py): fix missing return statement in PromptVertex's _built_object_repr method
The _built_object_repr method in the PromptVertex class was missing a return statement, causing it to not return any value. This fix adds the missing return statement to ensure the method returns the correct value.
2023-07-06 17:08:54 -03:00
Gabriel Luiz Freitas Almeida
b32e4ca8b9 🐛 fix(util.py): improve type formatting in format_dict function
The format_dict function now properly handles different variations of list types by removing unnecessary characters from the type string. This improves the consistency and accuracy of the type formatting in the function.
2023-07-06 17:08:28 -03:00
Lucas Oliveira
4616ca68bd Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-07-06 15:51:51 -03:00
Lucas Oliveira
4e9204d884 🔥 refactor(genericModal/index.tsx): remove unused code that sets the value of inputValue in case 1 of myModalType 2023-07-06 15:51:25 -03:00
Gabriel Luiz Freitas Almeida
f6ed832f26 🔥 refactor(genericModal/index.tsx): remove unused imports and lodash set function
🐛 fix(genericModal/index.tsx): update error message to be more descriptive and change setErrorData to setNoticeData
The commit removes unused imports for Tooltip components and the lodash set function, as they are no longer used in the file. Additionally, the error message displayed when the template does not contain any variables for data entry is updated to be more descriptive. Instead of setting an error message, a notice message is set using the setNoticeData function from the alertContext. This provides a clearer message to the user about the absence of variables in the template.
2023-07-06 15:51:13 -03:00
Gabriel Luiz Freitas Almeida
54b13a6bb6 🔀 refactor(callback.py): reorganize imports and add missing type hints
🔀 refactor(callback.py): reorganize imports and add missing type hints to improve code readability and maintainability
The changes in this commit include reorganizing the imports to group them properly and adding missing type hints to improve code readability and maintainability.
2023-07-06 15:33:57 -03:00
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
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