Commit graph

12,533 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
cfcdb67ed9 🚀 feat(base.py): add default values for string and prompt type parameters in _build_params method
The unused imports have been removed to improve code cleanliness. The code in the _build_params method has been simplified by removing unnecessary conditions and loops. Default values are now added for string and prompt type parameters to ensure that they have a value even if not explicitly set.
🔧 fix(base.py): remove unused imports and simplify code in _build_params method
2023-06-29 22:05:22 -03:00
Lucas Oliveira
966444a88b 🐛 fix(formModal/index.tsx): remove unnecessary handle badge from AccordionTrigger and AccordionItem components 2023-06-29 21:33:05 -03:00
Lucas Oliveira
2c4803d28a 🔨 refactor(formModal/index.tsx): remove unused code related to handle_keys in the form modal
🔨 refactor(formModal/index.tsx): remove unused code related to handle_keys in the form modal to improve code readability and maintainability
2023-06-29 21:29:34 -03:00
Lucas Oliveira
afd7641063 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-29 21:14:47 -03:00
Lucas Oliveira
e4b03d7765 🐛 fix(parameterComponent): import lodash library to use _.cloneDeep function
🐛 fix(chatComponent): import lodash library to use _.cloneDeep function
 feat(chatComponent): add TabsContext to access tabsState and update isBuilt state based on tabsState changes
2023-06-29 21:14:30 -03:00
Gabriel Luiz Freitas Almeida
9e973f0bfc
🔖 chore(pyproject.toml): update package version to 0.2.7 (#573) 2023-06-29 20:44:47 -03:00
Gabriel Luiz Freitas Almeida
e426698c45
Merge branch 'main' into release 2023-06-29 20:44:38 -03:00
Gabriel Luiz Freitas Almeida
606779f216 🔖 chore(pyproject.toml): update package version to 0.2.7
The package version has been updated from 0.2.6 to 0.2.7. This change is made to reflect the latest changes and improvements in the package.
2023-06-29 20:43:52 -03:00
Gabriel Luiz Freitas Almeida
e98e0b22df 🐛 fix(vertex/base.py): add input types from template_dicts to optional_inputs
🐛 fix(interface/initialize/loading.py): handle BaseOutputParser instances in instantiate_prompt
The `optional_inputs` list in the `Vertex` class is now extended with the `input_types` from the `template_dicts` dictionary. This ensures that the `optional_inputs` list contains all the input types that are not required. In the `instantiate_prompt` function, if the `variable` is an instance of `BaseOutputParser` and has a `get_format_instructions` method, the `format_kwargs` dictionary is updated with the result of calling `get_format_instructions()`. This allows handling `BaseOutputParser` instances correctly in the `instantiate_prompt` function.
2023-06-29 20:43:22 -03:00
Gustavo Schaedler
12164ec79a
CSS Color Changes and Dark Mode Implementation - New Style Features (#572)
This pull request introduces significant style changes to the website,
focusing on CSS color modifications and the implementation of a dark
mode feature. These updates enhance the overall visual appeal and
improve user experience in different lighting environments. Below is a
detailed overview of the changes made.

Updated Color Palette: The existing color scheme has been revamped to
create a more visually appealing and cohesive design. This involved
modifying the colors used throughout the website, including background
colors, text colors, and accent colors.

Dark Mode Implementation: A new feature, dark mode, has been added to
provide users with an alternative interface that is easier on the eyes
in low-light environments. The dark mode utilizes a new set of colors
specifically designed for this mode, ensuring optimal readability and
aesthetic appeal.

CSS Classes and Selectors: New CSS classes and selectors have been
introduced to facilitate the implementation of the color changes and
dark mode feature. These classes are applied to specific elements within
the HTML structure, allowing for precise control over the appearance of
different components.
2023-06-30 00:41:27 +01:00
Lucas Oliveira
ffebce974f 🔨 refactor(formModal): remove unused keysValue state variable to improve code cleanliness and readability
🔨 refactor(formModal): update formKeysData type in tabsState to include handle_keys array for better data structure consistency and completeness
2023-06-29 20:34:31 -03:00
Lucas Oliveira
fce7b398f7 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-29 20:30:44 -03:00
Lucas Oliveira
21174c0e8b Fixed key problem 2023-06-29 20:30:39 -03:00
gustavoschaedler
dd009a2913 feat: Add support for Custom Component in Langflow Interface
This commit adds support for Custom Component in the Langflow interface. It introduces a new class `CustomComponent`, which takes in a `code` as a parameter and validates it. The `CustomComponent` class also provides a method to get the function specified in the code.

The commit also makes some modifications in `initialize/loading.py` file to handle the new `CustomComponent` class. It adds a new helper function `get_function_custom` which creates a function using `validate.create_function` and the `build` function name.
2023-06-30 00:23:50 +01:00
Cristhian Zanforlin Lousa
e95dd524a8 formatting branch 2023-06-29 19:58:34 -03:00
Gustavo Schaedler
d3793e364c
Adding New Components, XSS treatment in the chat, other fixes (#571)
- PostgresChatMessageHistory added to allow loading memory from external
sources
- MultiQueryRetriever added which builds better queries to
Retrievers/VectorStores
- XSS protection in the chat that uses markdown
- FrontendNode refactor start
- Fix Serializable nodes that were exposing wrong base classes on
Components
- ConversationEntityMemory as the first memory with EntityStore (entity
stores coming very soon)
2023-06-29 23:52:12 +01:00
Cristhian Zanforlin Lousa
4039540148 🐛 fix(GenericNode): add strokeWidth property to Icon component to fix styling issue
🐛 fix(NodeModal): add strokeWidth property to Icon component to fix styling issue
🐛 fix(DisclosureComponent): add strokeWidth property to Icon component to fix styling issue
🐛 fix(extraSidebarComponent): add strokeWidth property to Icon components to fix styling issue
2023-06-29 19:51:28 -03:00
Gabriel Luiz Freitas Almeida
ca32bc3ab5 📦 chore(poetry.lock): update strenum package version to 0.4.15
The strenum package has been updated from version 0.4.12 to version 0.4.15. This update may include bug fixes, performance improvements, or new features.
2023-06-29 19:46:33 -03:00
Gabriel Luiz Freitas Almeida
9fe13ca52d 🔀 chore(test_llms_template.py): rename base class from "Serializable" to "BaseLLM" for clarity and consistency
The base class "Serializable" has been renamed to "BaseLLM" to provide a more descriptive and consistent name for the class. This change improves clarity and maintainability of the code.
2023-06-29 19:46:08 -03:00
Cristhian Zanforlin Lousa
a8d7edff7a 🔧 fix(frontend): update class names and colors in singleAlertComponent and NoticeAlert components to match the new design
🔧 fix(frontend): update class names and colors in index.css to match the new design
🔧 fix(frontend): update tailwind.config.js to use the new color variable name 'status-blue' instead of 'medium-dark-blue'
2023-06-29 19:45:22 -03:00
Gabriel Luiz Freitas Almeida
169815fd3f
Flow Tweaks (#567) 2023-06-29 19:39:10 -03:00
Gabriel Luiz Freitas Almeida
60032d6146 🐛 fix(AccordionComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(codeAreaComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(dropdownComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(floatComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(inputFileComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(inputListComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(intComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(promptComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(textAreaComponent): fix formatting and add missing semicolons to improve code readability and maintainability
🐛 fix(ui/accordion.tsx): fix formatting and add missing semicolons to improve code readability and maintainability

The changes were made to fix formatting issues and add missing semicolons in the code. This improves code readability and maintainability, making it easier for developers to understand and work with the code.

🐛 fix(constants.tsx): fix formatting and indentation issues in the buildTweakObject function
🐛 fix(popUpContext.tsx): remove unnecessary empty line
🐛 fix(tabsContext.tsx): remove unnecessary empty line
🐛 fix(ApiModal/index.tsx): fix formatting and indentation issues
🐛 fix(codeAreaModal/index.tsx): fix formatting and indentation issues
🐛 fix(types/components/index.ts): remove unnecessary empty line
The changes in constants.tsx fix formatting and indentation issues in the buildTweakObject function to improve code readability. The changes in popUpContext.tsx, tabsContext.tsx, ApiModal/index.tsx, codeAreaModal/index.tsx, and types/components/index.ts fix formatting and indentation issues to ensure consistent code style.
2023-06-29 19:36:22 -03:00
Gabriel Luiz Freitas Almeida
b188400517 🐛 fix(loading.py): improve error message formatting when failing to build connection to database
🐛 fix(base.py): add optional 'name' parameter to the format method in FieldFormatter
In loading.py, the error message when failing to build a connection to the database is now formatted in a more readable way. This improves the clarity of the error message and makes it easier to identify the cause of the issue.

In base.py, the format method in FieldFormatter now accepts an optional 'name' parameter. This allows for more flexibility when formatting the field and provides the ability to include the field name in the formatting process if needed.
2023-06-29 19:36:04 -03:00
Gabriel Luiz Freitas Almeida
1743edfd1d 🐛 fix(loading.py): handle case when "handle_keys" is not in params dictionary and add input_variable to "handle_keys" list
The code now checks if the "handle_keys" key is present in the params dictionary. If it is not present, it creates an empty list and adds the input_variable to it. This ensures that the "handle_keys" list is always present and the input_variable is correctly added to it.
2023-06-29 19:31:01 -03:00
Gabriel Luiz Freitas Almeida
d6bd8a1a1b 🔧 chore(utils.py): add support for handle_keys in build_input_keys_response function
The build_input_keys_response function now includes support for handle_keys in the response. This allows the function to populate the handle_keys field in the response with the values from the artifacts dictionary, if available.
2023-06-29 19:30:51 -03:00
Gabriel Luiz Freitas Almeida
15e38be62e
Merge branch 'release' into feat-tweaks 2023-06-29 19:22:12 -03:00
Lucas Oliveira
356719f115 Connection made successfully at the handle nodes 2023-06-29 19:19:06 -03:00
Gabriel Luiz Freitas Almeida
879390488e 🔖 chore(pyproject.toml): update package version to 0.2.7
The package version has been updated from 0.2.6 to 0.2.7. This change is made to reflect the latest changes and improvements in the package.
2023-06-29 19:06:50 -03:00
Gabriel Luiz Freitas Almeida
67d889c8d0
Merge branch 'main' into release 2023-06-29 19:05:10 -03:00
Gabriel Luiz Freitas Almeida
eb53798c41 🐛 fix(utils.ts): update color code for "retrievers" in nodeColors object
The color code for the "retrievers" category in the nodeColors object has been updated from "#F5B85A" to "#e6b25a". This change was made to ensure consistency and improve the visual representation of the "retrievers" category.
2023-06-29 18:43:37 -03:00
Gabriel Luiz Freitas Almeida
4f94662881 📝 docs(config.yaml): add documentation for ConversationEntityMemory integration
The ConversationEntityMemory integration is now documented in the config.yaml file. This provides a link to the documentation for using the ConversationEntityMemory module with SQLite as the underlying storage. This change improves the clarity and accessibility of the documentation for this integration.
2023-06-29 18:43:24 -03:00
Rodrigo Nader
9098d8cd29 remove index1 2023-06-29 18:43:05 -03:00
Rodrigo Nader
262eac0f46 Merge remote-tracking branch 'origin/dev' into new-style-features 2023-06-29 18:42:53 -03:00
Cristhian Zanforlin Lousa
82c469d3c2 🔥 refactor(constants.tsx): remove console.log statements for better code cleanliness and performance 2023-06-29 18:42:40 -03:00
Cristhian Zanforlin Lousa
fdb998688a 🐛 fix(codeAreaComponent): update initial state of myValue to handle non-string values properly
🐛 fix(constants.tsx): refactor getCurlCode and getPythonCode to use buildTweakObject function for generating tweak object

🐛 fix(ApiModal): update logic for opening accordions based on tweak.current length and closeEdit value
2023-06-29 18:42:09 -03:00
Gabriel Luiz Freitas Almeida
2b33334de6 🔒 chore(poetry.lock): update google-api-python-client version to 2.91.0
🔒 chore(poetry.lock): update joblib version to 1.3.1
The versions of the anthropic, google-api-python-client, and joblib packages have been updated to their latest versions. This ensures that the application is using the most recent bug fixes, improvements, and features provided by these packages.
2023-06-29 18:41:23 -03:00
Rodrigo Nader
27b17a13c2 Refactor styles and class names in multiple components, update color variables, and adjust button and control styles.
- Simplify class names in the SingleAlert component and update color variables.
- Update class names and color variables in the Dialog component.
- Update color variables in the constants file.
- Update color variables and class names in the index.css file.
- Update class names and color variables in the PageComponent file.
- Add a color variable for shared blur styles.
- Update Tailwind CSS configuration to include new color variables.

Note: These changes improve code readability and maintain color consistency throughout the application.
2023-06-29 18:39:00 -03:00
Gabriel Luiz Freitas Almeida
08c7bb5230 🐛 fix(loading.py): catch additional exception when object has no 'conn' field to improve error handling
The code now catches an additional exception when the object does not have a 'conn' field. This improves the error handling by providing a more specific error message when building a connection to the database fails.
2023-06-29 18:38:36 -03:00
Gabriel Luiz Freitas Almeida
4761eda9a0 🔀 chore(base.py): add 'SQLiteEntityStore' to 'from_method_nodes' dictionary
The 'from_method_nodes' dictionary in the 'MemoryCreator' class in 'base.py' has been updated to include the 'SQLiteEntityStore' class and its '__init__' method. This change allows the 'SQLiteEntityStore' class to be used as a memory node in the LangFlow application.
2023-06-29 18:38:08 -03:00
Gabriel Luiz Freitas Almeida
6fa295b8a8 🐛 fix(memories.py): fix condition to add extra fields in MemoryFrontendNode class
 feat(memories.py): add show attribute to entity_store field in MemoryFrontendNode class
The condition to add extra fields in the MemoryFrontendNode class has been fixed to correctly check if any of the base classes are in a list of base message classes. Additionally, the show attribute has been added to the entity_store field in the MemoryFrontendNode class to control its visibility.
2023-06-29 18:37:52 -03:00
Gabriel Luiz Freitas Almeida
c834d91efd 🐛 fix(util.py): exclude "kwargs" and "args" parameters from the generated template dictionary
The "kwargs" and "args" parameters are now excluded from the generated template dictionary. This ensures that only the relevant parameters are included in the template, improving the accuracy and usefulness of the generated template.
2023-06-29 18:37:33 -03:00
Gabriel Luiz Freitas Almeida
f81a835001 🐛 fix(process.py): add error handling for unknown langchain_object types
When processing the data graph, if the langchain_object is of an unknown type, a ValueError is now raised. This provides better error handling and helps identify any unexpected langchain_object types that may be encountered during processing.
2023-06-29 18:19:22 -03:00
Gabriel Luiz Freitas Almeida
7eeacfbb31 🐛 fix(base.py): add support for creating MemoryFrontendNode from a method
 feat(base.py): add support for creating MemoryFrontendNode from a specific method in ZepChatMessageHistory class
The `MemoryCreator` class now supports creating `MemoryFrontendNode` from a specific method in the `ZepChatMessageHistory` class. This is achieved by adding the `from_method_nodes` dictionary with the method name as the key and the class name as the value. The `build_template_from_method` function is used to create the `MemoryFrontendNode` from the specified method. This enhancement allows for more flexibility in creating `MemoryFrontendNode` instances.
2023-06-29 17:39:46 -03:00
Gabriel Luiz Freitas Almeida
77cc23bf5f 🐛 fix(base.py): fix method name in build_template_from_method call for MultiQueryRetriever
 feat(base.py): add support for ZepRetriever in from_method_nodes dictionary
The build_template_from_method call for the MultiQueryRetriever in the get_signature method was using the incorrect method name "from_llm". It has been fixed to use the correct method name "from_method_nodes". Additionally, support for the ZepRetriever has been added to the from_method_nodes dictionary to allow for its usage in the RetrieverCreator class.
2023-06-29 17:39:36 -03:00
Gabriel Luiz Freitas Almeida
e24ad0513b 🔧 chore(memories.py): set 'url' field to be shown in the frontend
The 'url' field in the MemoryFrontendNode class is now set to be shown in the frontend. This change allows the 'url' field to be visible and accessible to users in the frontend interface.
2023-06-29 17:39:25 -03:00
Gabriel Luiz Freitas Almeida
26c42cac05 🔧 chore(util.py): exclude "self" parameter from template building
The "self" parameter is now excluded from the template building process. This change improves the accuracy of the generated template by removing unnecessary information.
2023-06-29 17:39:12 -03:00
Gabriel Luiz Freitas Almeida
9e44720ac8 🔧 chore(config.yaml): comment out unused integrations in memories and retrievers sections
The unused integrations in the memories and retrievers sections have been commented out to improve code readability and remove unnecessary clutter. These integrations are not currently being used in the application and can be safely ignored.
2023-06-29 17:38:58 -03:00
Rodrigo Nader
c0dbafe49f refactor(components): Update CSS classes in codeAreaComponent, floatComponent, intComponent, and dialog
- Update CSS classes in codeAreaComponent, floatComponent, intComponent, and dialog components to improve styling and maintain consistency.
- Replace specific color values with Tailwind CSS utility classes.
- Refactor input styles and focus styles for better user experience.
- Remove unused CSS classes from index.css.
2023-06-29 16:49:24 -03:00
Cristhian Zanforlin Lousa
a41c8552a8 🎨 style(parameterComponent): add full width to the div container for better layout consistency 2023-06-29 16:42:38 -03:00
Cristhian Zanforlin Lousa
5522b51d6b 🐛 fix(parameterComponent): add margin-top to the container divs to improve spacing between elements 2023-06-29 16:41:41 -03:00