Commit graph

3,125 commits

Author SHA1 Message Date
gustavoschaedler
fb91b17c51 📦 chore(router.py): add component_router to APIRouter to include component routes
📦 chore(__init__.py): add component_router to __all__ list to expose component routes
📦 feat(components.py): add routes for creating, reading, updating, and deleting components
📦 chore(endpoints.py): import Component model from database.models.component
📦 chore(schemas.py): add ComponentListCreate and ComponentListRead schemas
📦 feat(models/component.py): add Component model with fields for name, description, and data
📦 feat(models/component.py): add ComponentCreate, ComponentRead, and ComponentUpdate models for CRUD operations on components
2023-07-12 00:08:52 +01:00
gustavoschaedler
719015b5bb 🐛 fix(custom.py): import re module to fix NameError when using re.split
🐛 fix(custom.py): fix indentation of class_template dictionary to improve readability
🐛 fix(custom.py): fix indentation of class dictionary to improve readability
🐛 fix(custom.py): fix indentation of _handle_function method to improve readability
🐛 fix(custom.py): fix indentation of transform_list method to improve readability
🐛 fix(custom.py): fix indentation of extract_class_info method to improve readability
🐛 fix(custom.py): fix indentation of _class_template_validation method to improve readability
🐛 fix(custom.py): fix indentation of build_langchain_template_custom_component method to improve readability
🐛 fix(custom.py): fix indentation of add_new_custom_field method to improve readability
🐛 fix(custom.py): fix indentation of add_code_field method to improve readability
🐛 fix(custom.py): fix indentation of extract_type_from_optional method to improve readability
🐛 fix(custom.py): fix indentation of build_langchain_template_custom_component method to improve readability
🔥 chore(custom.py): remove unused imports and variables
 feat(custom.py): add support for splitting a string by ':' or '=' and padding with None until length is 3 in _split_string method
 feat(custom.py): add support for transforming a list of strings by splitting each string and padding with None in transform_list method
 feat(custom.py): add support for extracting the type from a string formatted as "Optional[<type>]" in extract_type_from_optional method
 feat(custom.py): add support for passing field_value and field_required parameters to add_new_custom_field method
 feat(custom.py): add support for passing field_value and field_required parameters to build_langchain_template_custom_component method
 feat(custom.py): add support for passing field_value and field_required parameters to add_new_custom_field method
 feat(custom.py): add support for passing field_value and field_required parameters to build_langchain_template_custom_component method
 feat(custom.py): add support for passing field_value and field_required parameters to add_new_custom_field method
 feat(custom.py): add support for passing field_value and field_required parameters to build_langchain_template_custom_component method
 feat(custom.py): add support for passing field_value and field_required parameters to add_new_custom_field method
 feat(custom.py): add support for
2023-07-10 23:38:01 +01:00
gustavoschaedler
6122521783 🐛 fix(custom.py): remove unused imports and unused code block to improve code cleanliness and performance
 feat(custom.py): add NotImplementedError to the build method to indicate that it needs to be implemented in subclasses
🚧 chore(test_custom_component.py): add test cases for various methods in the CustomComponent class to improve test coverage and ensure code correctness
2023-07-10 19:34:36 +01:00
Gabriel Luiz Freitas Almeida
352cb8bc85 formatting 2023-07-09 11:12:41 -03:00
Gabriel Luiz Freitas Almeida
5ece7e2fbc 🔥 refactor(loading.py): remove unused imports and reorganize import statements for better readability 2023-07-09 11:10:35 -03:00
Gabriel Luiz Freitas Almeida
d2750dd3dc 🔥 refactor(base.py): remove unused method process_base_classes from FrontendNode class
The `process_base_classes` method in the `FrontendNode` class is no longer used and can be safely removed to improve code readability and maintainability.
2023-07-09 11:10:07 -03:00
Gabriel Luiz Freitas Almeida
2f24fca1f2 🐛 fix(base.py): fix issue where CustomComponentCreator.to_list() method always returns None 2023-07-09 11:09:44 -03:00
Gabriel Luiz Freitas Almeida
dc80513691 🐛 fix(types.py): change variable name from 'name' to 'display_name' in add_new_custom_field function to improve clarity
🔧 chore(types.py): add warning when 'name' key is used in field_config to inform that it can't be changed
2023-07-09 11:09:19 -03:00
Gabriel Luiz Freitas Almeida
19b84247cf 🐛 fix(custom.py): improve error message formatting for invalid entrypoint function name and return type 2023-07-09 11:08:50 -03:00
anovazzi1
a55088d7cb fix(codeAreaModal/index.tsx): add useEffect import to fix missing dependency warning
feat(codeAreaModal/index.tsx): add postCustomComponent import to enable posting custom components
2023-07-07 19:38:38 -03:00
gustavoschaedler
7744ee3639 Add postCustomComponent API controller for uploading custom components.
This commit adds the postCustomComponent function to the API controller. It allows for uploading custom components by sending a POST request to `/api/v1/custom_component` with the code as a parameter.
2023-07-07 23:12:32 +01:00
gustavoschaedler
da9764b3c5 Merge remote-tracking branch 'origin/form_io' into python_custom_node_component
Merge remote-tracking branch 'origin/form_io' into python_custom_node_component

- Updated the README files to correct the spelling of "Langflow" in various places.
- Added a new `.env.example` file for reference and configuration.
- Updated the CONTRIBUTING.md file to use "Langflow" instead of "LangFlow".
- Updated the GCP_DEPLOYMENT.md file to use the correct GitHub repository URL.
- Updated the README file to use "Langflow" instead of "LangFlow" and corrected the formatting of the table of contents.
- Updated the CLI usage instructions in the README file to use "Langflow" and provided more detailed explanations of each option.
- Added a section on Deployment in the README file with instructions for deploying Langflow on Google Cloud Platform.
- Updated the "Creating Flows" section in the README file to use "Langflow" instead of "LangFlow" and corrected the link to the LangChain components.
- Updated the "Contributing" section in the README file to use "Langflow" instead of "LangFlow" and corrected the link to the contributing guidelines.
- Updated the "License" section in the README file to use "Langflow" instead of "LangFlow".
- Updated the version of the "anyio" package in the poetry.lock file to 3.7.1.

Merge remote-tracking branch 'origin/form_io' into python_custom_node_component

- Updated the README files to correct the spelling of "Langflow" in various places.
- Added a new `.env.example` file for reference and configuration.
- Updated the CONTRIBUTING.md file to use "Langflow" instead of "Langflow".
- Updated the GCP_DEPLOYMENT.md file to use the correct GitHub repository URL.
- Updated the README file to use "Langflow" instead of "Langflow" and corrected the formatting of the table of contents.
- Updated the CLI usage instructions in the README file to use "Langflow" and provided more detailed explanations of each option.
- Added a section on Deployment in the README file with instructions for deploying Langflow on Google Cloud Platform.
- Updated the "Creating Flows" section in the README file to use "Langflow" instead of "Langflow" and corrected the link to the LangChain components.
- Updated the "Contributing" section in the README file to use "Langflow" instead of "Langflow" and corrected the link to the contributing guidelines.
- Updated the "License" section in the README file to use "Langflow" instead of "Langflow".
- Updated the version of the "anyio" package in the poetry.lock file to 3.7.1.

Merge remote-tracking branch 'origin/form_io' into python_custom_node_component

- Updated the README files to correct the spelling of "Langflow" in various places.
- Added a new `.env.example` file for reference and configuration.
- Updated the CONTRIBUTING.md file to use "Langflow" instead of "Langflow".
- Updated the GCP_DEPLOYMENT.md file to use the correct GitHub repository URL.
- Updated the README file to use "Langflow" instead of "Langflow" and corrected the formatting of the table of contents.
- Updated the CLI usage instructions in the README file to use "Langflow" and provided more detailed explanations of each option.
- Added a section on Deployment in the README file with instructions for deploying Langflow on Google Cloud Platform.
- Updated the "Creating Flows" section in the README file to use "Langflow" instead of "Langflow" and corrected the link to the LangChain components.
- Updated the "Contributing" section in the README file to use "
2023-07-07 22:55:17 +01:00
Gabriel Luiz Freitas Almeida
caaabf5023 🔥 refactor(test_graph.py): remove unused imports and test cases related to specific vertex types
🔬 test(test_graph.py): remove test cases for building specific vertex types
The commit removes unused imports and test cases related to specific vertex types that are no longer used in the codebase. This improves code cleanliness and reduces clutter. The removed test cases were for building specific vertex types, which are no longer necessary as the build method is now tested in a more general way.
2023-07-07 18:26:00 -03:00
Gabriel Luiz Freitas Almeida
94d598b59c 🔧 fix(test_endpoints.py): fix import statement for TimeTravelGuideChainNode
🔧 fix(test_endpoints.py): update test_get_all to assert "PromptTemplate" instead of "ZeroShotPrompt"
🔧 fix(test_endpoints.py): update test_valid_prompt and test_invalid_prompt to use PROMPT_REQUEST variable
🔧 fix(test_endpoints.py): update test_various_prompts to use PROMPT_REQUEST variable
🔧 fix(test_prompts_template.py): remove test_zero_shot_prompt as it is no longer needed
The import statement for TimeTravelGuideChainNode is fixed to ensure the correct module is imported. The test_get_all function is updated to assert the presence of "PromptTemplate" instead of "ZeroShotPrompt" in the response. The test_valid_prompt, test_invalid_prompt, and test_various_prompts functions are updated to use the PROMPT_REQUEST variable for the request payload. The test_zero_shot_prompt function is removed as it is no longer needed.
2023-07-07 18:25:57 -03:00
Gabriel Luiz Freitas Almeida
47ab165015 Formatting 2023-07-07 18:25:56 -03:00
Gabriel Luiz Freitas Almeida
fc4dca8a6d 🔧 fix(customs.py): add MongoDBChatMessageHistory to CUSTOM_NODES dictionary
 feat(memories.py): add MongoDBChatMessageHistoryFrontendNode class to support MongoDB as a memory store
The CUSTOM_NODES dictionary in customs.py has been updated to include the "MongoDBChatMessageHistory" memory. This allows the application to use MongoDB as a memory store for chat message history. The MongoDBChatMessageHistoryFrontendNode class has been added to memories.py, providing the necessary functionality and configuration options for interacting with MongoDB as a memory store.
2023-07-07 18:25:54 -03:00
Gabriel Luiz Freitas Almeida
05f30a585f 🔧 chore(GenericNode): optimize imports and remove duplicate imports
🔧 chore(ShadTooltipComponent): remove unused import and set default value for delayDuration prop
🔧 chore(ApiModal): optimize imports and remove unused imports
🔧 chore(genericModal): optimize imports and remove unused imports

The changes were made to optimize the imports and remove duplicate and unused imports in the respective files. This improves the codebase by reducing unnecessary dependencies and improving maintainability.
2023-07-07 18:25:52 -03:00
Cristhian Zanforlin Lousa
c9b5a09c46 🐛 fix(table.tsx): remove unnecessary "overflow-auto" class from table container div to fix styling issue 2023-07-07 18:23:04 -03:00
Cristhian Zanforlin Lousa
39daf5e8cf 🔧 fix(ShadTooltipComponent): add style prop to ShadTooltip component to allow custom styling
🔧 fix(types): add style property to ShadToolTipType to reflect the changes in ShadTooltipComponent
2023-07-07 18:14:01 -03:00
Cristhian Zanforlin Lousa
867c7a067d Merge branch 'form_io' of https://github.com/logspace-ai/langflow into form_io 2023-07-07 17:37:29 -03:00
Cristhian Zanforlin Lousa
2525ad218c 🐛 fix(dropdownComponent): add 'nowheel' class to options when editNode is true to fix styling issue
🐛 fix(inputFileComponent): fix class order in className to ensure correct styling when editNode is true
🐛 fix(genericModal): remove unnecessary conditional rendering of '-' in Input Variables label
2023-07-07 17:37:23 -03:00
Gabriel Luiz Freitas Almeida
fcac473a61 🔀 chore(config.yaml): reorganize the order of sections in the config file
The order of sections in the config.yaml file has been adjusted for better readability and organization. The "prompts" section has been moved to the top, followed by the "memories" section, and then the "textsplitters" section. This change improves the structure and consistency of the config file.
2023-07-07 17:22:44 -03:00
anovazzi1
97e1c8ab2e Merge branch 'form_io' of personal:logspace-ai/langflow into form_io 2023-07-07 16:46:31 -03:00
anovazzi1
c4ce44c592 bug fix for ace 2023-07-07 16:45:26 -03:00
Gabriel Luiz Freitas Almeida
57af6a7b66 Revert "Formatting"
This reverts commit 7304b922b9.
2023-07-07 16:44:31 -03:00
Gabriel Luiz Freitas Almeida
6f9520d620 🐛 fix(base.py): add type hint for 'template' attribute in FrontendNodeRequest class
🐛 fix(utils.py): add input validation for 'chat_inputs.message' to prevent errors when no message is provided
🐛 fix(loading.py): add type hint for 'format_kwargs' variable in instantiate_prompt function
🐛 fix(base.py): add type hint for 'inputs' parameter in get_result_and_steps function
The changes in `base.py` and `utils.py` are bug fixes that address potential issues in the code. The type hint for the 'template' attribute in the `FrontendNodeRequest` class is added to improve code clarity and maintainability. The input validation for 'chat_inputs.message' in the `process_graph` function ensures that an error is raised when no message is provided, preventing potential issues down the line. In `loading.py`, the type hint for the 'format_kwargs' variable in the `instantiate_prompt` function improves type safety. Lastly, in `base.py`, the type hint for the 'inputs' parameter in the `get_result_and_steps` function ensures proper type checking.
2023-07-07 15:54:15 -03:00
Gabriel Luiz Freitas Almeida
4e078d7de5 🐛 fix(agents.py): change field type name from 'type_name' to 'field_type' for consistency
The 'type_name' attribute for the 'Tools' field in the 'ZeroShotAgent' class has been changed to 'field_type' to improve consistency with the naming conventions used in the codebase.
2023-07-07 15:53:48 -03:00
Gabriel Luiz Freitas Almeida
da0cf30057 🐛 fix(loading.py): fix condition to remove empty input_key and output_key parameters
The condition to remove empty input_key and output_key parameters has been fixed to correctly handle cases where the parameters are empty strings. This ensures that the parameters are only removed if they are either empty strings or not present in the params dictionary.
2023-07-07 15:38:36 -03:00
Gabriel Luiz Freitas Almeida
7304b922b9 Formatting 2023-07-07 15:34:22 -03:00
Gabriel Luiz Freitas Almeida
4bc1a843d1 🔧 chore(frontend): add prettier-plugin-organize-imports package to improve code formatting
The prettier-plugin-organize-imports package is added to the project to improve code formatting. This plugin helps to organize and sort import statements in a consistent and standardized manner, making the codebase more readable and maintainable.
2023-07-07 15:33:43 -03:00
Cristhian Zanforlin Lousa
2e5ebabb59 🐛 fix(genericModal/index.tsx): adjust styling of the modal content container to fix layout issue 2023-07-07 15:18:37 -03:00
Cristhian Zanforlin Lousa
5e1b490ed2 Merge branch 'form_io' of https://github.com/logspace-ai/langflow into form_io 2023-07-07 15:17:04 -03:00
Cristhian Zanforlin Lousa
1a83cce2f0 🔧 fix(genericModal/index.tsx): fix CSS class name in DialogContent to include gap-2 to add gap between elements
🔧 fix(genericModal/index.tsx): fix CSS class name in flex container to change height to h-[55vh]
🔧 fix(genericModal/index.tsx): fix CSS class name in div container to change height to h-[60px] and adjust width for different screen sizes
🔧 fix(genericModal/index.tsx): fix CSS class name in Badge component to add max-width and truncate long text
🔧 fix(genericModal/index.tsx): fix logic to handle long text in Tooltip component and truncate it if necessary
🔧 fix(genericModal/index.tsx): fix logic to handle button click in DialogFooter component and close modal if input value is empty
2023-07-07 15:16:57 -03:00
Gabriel Luiz Freitas Almeida
85e27d488c 🐛 fix(utils.ts): fix a syntax error in the buildInputs function
The syntax error was caused by a missing quotation mark in the default value of the JSON string. The fix adds the missing quotation mark to ensure the JSON string is valid.
2023-07-07 15:10:20 -03:00
Lucas Oliveira
0c3517149d 🎨 style(chatMessage/index.tsx): add images for robot and male technologist icons to improve visual representation
🔧 chore(chatMessage/index.tsx): update image paths for robot and male technologist icons to match new file locations
2023-07-07 15:07:21 -03:00
Lucas Oliveira
1c6fd14fa5 🐛 fix(chatMessage): adjust styling of chat message container to improve alignment and spacing 2023-07-07 14:58:03 -03:00
Lucas Oliveira
257e73059f 🔧 fix(constants.tsx): import missing lucide-react icons to fix compilation errors
🔧 fix(chatMessage/index.tsx): import missing lucide-react icons to fix compilation errors
🔧 fix(formModal/index.tsx): import missing THOUGHTS_ICON constant to fix compilation errors
2023-07-07 14:57:21 -03:00
Lucas Oliveira
effd0ea52d Merge branch 'dev' into form_io 2023-07-07 14:44:09 -03:00
Lucas Oliveira
16ed5f67aa
Fix characters passing through password icon (#622)
Fix password input style
2023-07-07 14:43:01 -03:00
Lucas Oliveira
54f7cfb821 🔥 refactor(cardComponent/index.tsx): remove unnecessary dialog component and simplify delete button implementation 2023-07-07 14:41:48 -03:00
Cristhian Zanforlin Lousa
dcb8de5335 🐛 fix(index.css): increase right padding of .search-icon class to improve alignment with other elements 2023-07-07 14:24:17 -03:00
Cristhian Zanforlin Lousa
f770347c0a Merge branch 'form_io' of https://github.com/logspace-ai/langflow into form_io 2023-07-07 14:12:10 -03:00
Cristhian Zanforlin Lousa
2262e8e0bd 🐛 fix(index.css): increase right padding of .search-icon class to improve alignment with other elements 2023-07-07 14:12:04 -03:00
Gabriel Luiz Freitas Almeida
e422ed9c78 🐛 fix(constants.tsx): fix indentation issue in getPythonApiCode function
The import statement for the 'typing' module was incorrectly indented, causing a syntax error. The import statement has been fixed to align with the correct indentation.
2023-07-07 13:55:15 -03:00
Gabriel Luiz Freitas Almeida
512b499915 feat(constants.tsx): add support for dynamic inputs in getPythonApiCode and getCurlCode functions
In the getPythonApiCode function, the run_flow function had an unnecessary type annotation for the message parameter. It was removed to improve code readability. Additionally, the variable name in the run_flow function was changed from inputs to payload to better reflect its purpose.

In the getCurlCode function, support for dynamic inputs was added. The inputs variable is now passed as an argument to the flow function, allowing for flexibility in providing different inputs when generating the curl code.
🐛 fix(constants.tsx): remove unnecessary type annotation and fix variable name in run_flow function
2023-07-07 13:51:16 -03:00
Igor Carvalho
d718b153da refactor(chatTrigger): Add new chatTrigger tailwind constants classes 2023-07-07 13:31:35 -03:00
Lucas Oliveira
bb362bd4ff 🐛 fix(chatMessage/index.tsx): fix CSS class name and position of the hidden message icon 2023-07-07 12:54:44 -03:00
Lucas Oliveira
dc415e22f5 🐛 fix(chatMessage/index.tsx): remove unnecessary class name "bg-border" to fix styling issue
 feat(chatMessage/index.tsx): add labels for chatbot and user avatars to improve accessibility and user experience
🐛 fix(chatMessage/index.tsx): adjust styling of chat message content to prevent overflow and improve readability
🐛 fix(chatMessage/index.tsx): adjust button background color to match the background color of the chat message container
2023-07-07 12:46:56 -03:00
Lucas Oliveira
fde865f9ca 🔀 chore(constants.tsx): refactor buildFlowScript function to use template literals for better readability and maintainability 2023-07-07 12:30:20 -03:00
Lucas Oliveira
9ea667aa64 🔥 refactor(utils.ts): remove console.log statement in buildInputs function to improve code cleanliness and remove unnecessary logging 2023-07-07 12:27:53 -03:00