Commit graph

11,619 commits

Author SHA1 Message Date
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
Gabriel Luiz Freitas Almeida
1dcb71b952 🐛 fix(base.py): handle case when base_type is None to avoid ValueError
The code now checks if the `base_type` attribute is None before attempting to instantiate a class. If `base_type` is None, a ValueError is raised with a descriptive error message. This fix prevents potential errors when the `base_type` is not found for a given node.
2023-07-05 17:21:03 -03:00
anovazzi1
e832711a1f first modal with subcomponents 2023-07-05 17:04:32 -03:00
Gabriel Luiz Freitas Almeida
d9891b9c86 🔧 chore(base.py): refactor code to improve readability and handle optional parameters
📝 chore(base.py): update comments and remove unused imports
The code in the `Vertex` class has been refactored to improve readability and handle optional parameters more effectively. The code now checks if a parameter is of type "code", "str", or "prompt" and if it is not already set in the `params` dictionary, it sets it to the corresponding value from the `value` dictionary. Additionally, if a parameter is not required and not set in the `params` dictionary, it checks if a default value is provided and sets it to the default value if available, otherwise it removes the parameter from the `params` dictionary. This change improves the handling of optional parameters and makes the code more maintainable.
2023-07-05 17:00:50 -03:00
Cristhian Zanforlin Lousa
6be38af44e merge fix 2023-07-05 16:48:44 -03:00
Gabriel Luiz Freitas Almeida
2fcc8296d2 formatting 2023-07-05 16:45:45 -03:00
Gabriel Luiz Freitas Almeida
df09f6119d 📝 docs(README.md): fix typo in Langflow to LangFlow for consistency
The typo in the word "LangFlow" has been fixed to ensure consistency in the naming convention used throughout the project.
2023-07-05 16:42:47 -03:00
Gabriel Luiz Freitas Almeida
b71913a0aa 🐛 fix(__main__.py): change word variable from "LangFlow" to "Langflow" for consistency
🐛 fix(schemas.py): change class name from "ExportedFlow" to "Exported flow from Langflow" for consistency
The word variable in __main__.py is changed from "LangFlow" to "Langflow" to maintain consistency in naming conventions. Similarly, the class name in schemas.py is changed from "ExportedFlow" to "Exported flow from Langflow" for consistency in naming conventions.
2023-07-05 16:42:13 -03:00
Gabriel Luiz Freitas Almeida
a73737435b 📝 docs(CONTRIBUTING.md): update project name to "Langflow" for consistency
📝 docs(README.md): update project name to "Langflow" for consistency
📝 chore(frontend): update project name in HTML title tag to "Langflow" for consistency
The project name "LangFlow" has been updated to "Langflow" for consistency throughout the documentation and codebase. This change improves readability and maintains a consistent naming convention.
2023-07-05 16:41:57 -03:00
Gabriel Luiz Freitas Almeida
90acee2273 🐛 fix(constants.tsx): fix typo in flow name from LangFlow to Langflow
🐛 fix(tabsContext.tsx): fix typo in variable name from LangFlowState to LangflowState
🐛 fix(flow_constants.tsx): fix typo in description from LangFlow to Langflow
🐛 fix(chatModal/index.tsx): fix typo in chat modal title from LangFlow Chat to Langflow Chat
🐛 fix(importModal/index.tsx): fix typo in import modal title from LangFlow Examples to Langflow Examples
🐛 fix(CommunityPage/index.tsx): fix typo in community page text from LangFlow to Langflow
🐛 fix(FlowPage/index.tsx): fix typo in flow page text from LangFlow to Langflow

The changes were made to fix typos in various parts of the codebase where the name "LangFlow" was misspelled as "Langflow". This improves consistency and ensures that the correct name is used throughout the application.
2023-07-05 16:41:35 -03:00
Lucas Oliveira
87061316b3 formatted code 2023-07-05 16:36:28 -03:00
Gabriel Luiz Freitas Almeida
14d50c878c 🔖 chore(pyproject.toml): update package version to 0.2.13
The package version has been updated from 0.2.12 to 0.2.13. This change is made to reflect the latest changes and improvements in the package.
2023-07-05 16:35:24 -03:00
Lucas Oliveira
e2a066d7f2 Added checks to see if the chat can open 2023-07-05 16:30:46 -03:00
Gabriel Luiz Freitas Almeida
68906407e7
Merge branch 'main' into release 2023-07-05 16:25:24 -03:00
Igor Carvalho
9922ea0593 feat: Add alerts tailwind constants classes 2023-07-05 16:12:48 -03:00
anovazzi1
b7124de011 Merge branch 'python_custom_node_component' of personal:logspace-ai/langflow into python_custom_node_component 2023-07-05 16:04:47 -03:00
anovazzi1
754cfceab6 feat(twoColumnsModal): add TwoColumnsModal component to display a modal with two columns
The TwoColumnsModal component is added to display a modal with two columns. It takes the following props:
- title: the title of the modal
- description: the description of the modal
- open: a boolean indicating whether the modal is open or not
- setOpen: a function to set the open state of the modal

The component renders a Dialog component from the ui/dialog module. It consists of a DialogTrigger, DialogContent, DialogHeader, DialogTitle, and DialogDescription. The DialogContent has a minimum width of 80vw.

Inside the DialogContent, there is a flex container with a height of 80vh and width of 100%. It contains two divs: one with a width of 2/5 and the other with a width of the remaining space.

The TwoColumnsModal component also exports two additional components: first and second. These components can be used as children of the TwoColumnsModal component to render content in the first and second columns, respectively.
2023-07-05 16:04:42 -03:00
gustavoschaedler
f12efa104d Refactor API v1 endpoints and remove unnecessary imports and code duplication
The `endpoints` module in the API v1 folder has been modified to remove an unnecessary import and some code duplication. These changes improve the code organization and maintainability.

This commit also removes a commented-out test endpoint that was intended for testing purposes but was never used. The endpoint has been removed from the codebase to avoid confusion and clutter.

The changes include removing an unused import statement from the module and removing an unused endpoint. The unused endpoint was a commented-out code block that contained example error responses. Since these examples were not needed for testing or documentation purposes, the endpoint has been safely removed.
2023-07-05 19:59:38 +01:00
gustavoschaedler
ecbb0feeab Refactor tools and constants modules
- Refactored the tools module to improve code readability and maintainability.
- Fixed import statements in the constants module to correctly import modules.
- Updated documentation and added comments for better understanding of the code.
2023-07-05 19:57:28 +01:00
gustavoschaedler
e3b6037fe9 Merge from form_io to python_custom_node_component 2023-07-05 19:56:41 +01:00
Gabriel Luiz Freitas Almeida
9c97490fd4
Merge pull request #613 from logspace-ai:fix_dotenv
🔧 chore(__main__.py): add load_params() function to load parameters from environment variables
2023-07-05 15:54:24 -03:00
Igor Carvalho
fa628a04fd feat: Add generic node tailwind constants classes 2023-07-05 15:50:57 -03:00
Gabriel Luiz Freitas Almeida
5138129003 🔧 chore(__main__.py): add load_params() function to load parameters from environment variables
The load_params() function is added to load the parameters from the environment variables. This allows for more flexibility and configurability of the application by allowing the parameters to be set via environment variables.
2023-07-05 15:41:49 -03:00
Gabriel Luiz Freitas Almeida
31c361ce23
Release 0.2.12 (#612) 2023-07-05 15:13:02 -03:00
Gabriel Luiz Freitas Almeida
0743e306c9
Merge branch 'main' into release 2023-07-05 15:11:51 -03:00
Gabriel Luiz Freitas Almeida
0b61a682cd
Added better CLI docs in README and bumps langchain-serve (#611) 2023-07-05 15:10:39 -03:00
Gabriel Luiz Freitas Almeida
08bc992d63 🔖 chore(pyproject.toml): update package version to 0.2.12
The package version has been updated from 0.2.11 to 0.2.12. This change is made to reflect the latest changes and improvements in the package.
2023-07-05 14:57:48 -03:00
Gabriel Luiz Freitas Almeida
92aa40db65
Added better CLI docs in README and bumps langchain-serve (#590) 2023-07-05 14:54:18 -03:00
Gabriel Luiz Freitas Almeida
3c13f87495
Merge branch 'release' into jcloud_fix 2023-07-05 14:48:29 -03:00
Gabriel Luiz Freitas Almeida
f7515eb7bd 📚 docs(README.md): update table of contents and headings for better organization and readability
🔧 chore(README.md): reformat and update CLI section for clarity and consistency
The README.md file has been updated to improve the organization and readability of the document. The table of contents has been updated to include all relevant sections. Headings have been adjusted to provide a clear hierarchy and improve navigation. The CLI section has been reformatted and updated to provide clearer instructions and explanations.
2023-07-05 14:45:28 -03:00
anovazzi1
b5c7646b37 fix(codeAreaModal): update error state type to match API response structure for better error handling
feat(codeAreaModal): add support for displaying error details and traceback in the error tab for better debugging
refactor(codeAreaModal): improve code readability and formatting for better maintainability
2023-07-05 14:01:09 -03:00
gustavoschaedler
68c6ac8ea2 Refactor base class removal logic and add dict representation
- Extracted the logic for removing unwanted base classes to a separate method called `process_base_classes`.
- Created a list `CLASSES_TO_REMOVE` which contains the names of the base classes to be removed.
- Updated `to_dict` method to call `process_base_classes` before generating the dict representation of the frontend node.
- Added a new method `process_base_classes` which removes the unwanted base classes from the list of base classes.
- The method `process_base_classes` updates the `base_classes` list, removing any base classes present in `CLASSES_TO_REMOVE`.

This commit enhances the code by separating the concerns of base class removal logic and dict representation generation.
2023-07-05 17:23:53 +01:00