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

feat: add loop component 🎁🎄 #5429

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: add loop component 🎁🎄 #5429

wants to merge 6 commits into from

Conversation

rodrigosnader
Copy link
Contributor

@rodrigosnader rodrigosnader commented Dec 24, 2024

This pull request introduces a new component, LoopComponent, to the logic module in the backend. The changes include adding the new component to the module's imports, registration, and defining the component's functionality.

New component addition:

Definition of LoopComponent:

  • src/backend/base/langflow/components/logic/loop.py: Defined the LoopComponent class, which iterates over a list of Data objects, outputting one item at a time and aggregating results. This includes methods for initializing data, outputting items, and returning aggregated results.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Dec 24, 2024
@severfire
Copy link

Oh, I wonder how it would work, can't wait to test it :-)

Thanks for great work!

@ogabrielluiz ogabrielluiz changed the title add loop component 🎁🎄 feat: add loop component 🎁🎄 Jan 6, 2025
@ogabrielluiz ogabrielluiz requested a review from Copilot January 6, 2025 18:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 6, 2025
@edwinjosechittilappilly
Copy link
Collaborator

The component works well in UI,
But gives error with the API.

Test case: #5615

rodrigosnader and others added 6 commits January 10, 2025 12:56
- Renamed 'loop' input to 'loop_input' for clarity.
- Simplified logic for checking loop input and aggregating results.
- Enhanced type hints for better code readability and maintainability.
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants