Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update node logic #2515

Merged
merged 24 commits into from
Jul 3, 2024
Merged

fix: update node logic #2515

merged 24 commits into from
Jul 3, 2024

Conversation

lucaseduoli
Copy link
Collaborator

  • Fix types attribution when updating a node
  • Fix error while putting the Edited variable as false on an unedited component

lucaseduoli and others added 20 commits June 27, 2024 23:56
- Changed base class from CustomComponent to Component
- Added multiple input fields: message, sender, sender_name, session_id
- Included output field for stored messages
- Improved logic to handle both string and Message types
- Enhanced error handling and validation for message storage
This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated.

The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts.

This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements.
@lucaseduoli lucaseduoli requested a review from italojohnny July 3, 2024 20:17
@lucaseduoli lucaseduoli self-assigned this Jul 3, 2024
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 3, 2024
@lucaseduoli lucaseduoli requested a review from ogabrielluiz July 3, 2024 20:17
@dosubot dosubot bot added bug Something isn't working python Pull requests that update Python code labels Jul 3, 2024
@lucaseduoli lucaseduoli enabled auto-merge (squash) July 3, 2024 20:21
@lucaseduoli lucaseduoli merged commit 17b730b into main Jul 3, 2024
26 checks passed
@lucaseduoli lucaseduoli deleted the fix/update_node branch July 3, 2024 20:55
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 3, 2024
@@ -14,7 +14,7 @@ const useCheckCodeValidity = (
// first check if data.type in NATIVE_CATEGORIES
// if not return
if (
!NATIVE_CATEGORIES.includes(types[data.type]) ||
!Object.keys(nodeNames).includes(types[data.type]) ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucaseduoli is this change backwards compatible with existing flows?
For example, if I'm using a compoenent without the "name" property, would the refresh button appear ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is compatible. That line specifically just takes the types of the categories that we display at the sidebar instead of a types constant.

ogabrielluiz pushed a commit to yaitec/langflow that referenced this pull request Jul 9, 2024
* Fixed bug where updating the node does not remove edited status

* Fixed order of edited override

* Made all node-changing functions to alter type the right way

* Update StoreMessageComponent for enhanced message handling

- Changed base class from CustomComponent to Component
- Added multiple input fields: message, sender, sender_name, session_id
- Included output field for stored messages
- Improved logic to handle both string and Message types
- Enhanced error handling and validation for message storage

* Apply Ruff formatting

* Update StoreMessageComponent for enhanced message handling

* Apply Ruff formatting

* Feat: add more types

* Format code

* feat: Add CreateListComponent for creating a list of texts

This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated.

The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts.

This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements.

* [autofix.ci] apply automated fixes

* Changed native categories to use the keys of the style utils categories, which is updated

* change component name

* chore: add the name attribute to the CustomComponent

* chore: assign the value of name to the components

* chore: change the logic of the type value returned

* chore: extract code to new func

* chore: change component_name value

* [autofix.ci] apply automated fixes

* Formatted files

---------

Co-authored-by: Rodrigo <[email protected]>
Co-authored-by: rodrigosnader <[email protected]>
Co-authored-by: igorrCarvalho <[email protected]>
Co-authored-by: anovazzi1 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: italojohnny <[email protected]>
nicoloboschi pushed a commit to datastax/ragstack-ai-langflow that referenced this pull request Jul 10, 2024
* Fixed bug where updating the node does not remove edited status

* Fixed order of edited override

* Made all node-changing functions to alter type the right way

* Update StoreMessageComponent for enhanced message handling

- Changed base class from CustomComponent to Component
- Added multiple input fields: message, sender, sender_name, session_id
- Included output field for stored messages
- Improved logic to handle both string and Message types
- Enhanced error handling and validation for message storage

* Apply Ruff formatting

* Update StoreMessageComponent for enhanced message handling

* Apply Ruff formatting

* Feat: add more types

* Format code

* feat: Add CreateListComponent for creating a list of texts

This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated.

The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts.

This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements.

* [autofix.ci] apply automated fixes

* Changed native categories to use the keys of the style utils categories, which is updated

* change component name

* chore: add the name attribute to the CustomComponent

* chore: assign the value of name to the components

* chore: change the logic of the type value returned

* chore: extract code to new func

* chore: change component_name value

* [autofix.ci] apply automated fixes

* Formatted files

---------

Co-authored-by: Rodrigo <[email protected]>
Co-authored-by: rodrigosnader <[email protected]>
Co-authored-by: igorrCarvalho <[email protected]>
Co-authored-by: anovazzi1 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: italojohnny <[email protected]>
(cherry picked from commit 17b730b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer python Pull requests that update Python code size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants