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: allow passing a Component to the set method #3597

Merged
merged 7 commits into from
Aug 28, 2024
Merged

Conversation

ogabrielluiz
Copy link
Contributor

This pull request includes a feature in the Component class, adding the _find_matching_output_method method to handle finding the appropriate output method for a given Component. It also includes a test for the graph set method with a valid component. These changes improve the functionality and reliability of the codebase.

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

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated.

Validation Report

Validation Active Result
All commits in this pull request has valid messages
Pull request does not introduce too many changes
Pull request has a valid title
Pull request has mentioned issues
Pull request has valid branch name
Pull request should have a non-empty body

Result

Pull request satisfies all enabled pull request rules.

Last Modified at 28 Aug 24 14:33 UTC

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 28, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3597.dmtpw4p5recq1.amplifyapp.com

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 28, 2024
This commit refactors the test_component.py file in the custom_component directory. The test_set_invalid_input() function has been renamed to test_set_component() to better reflect its purpose. Additionally, the test_set_component() function now sets the agent parameter using the set_component() method instead of raising a ValueError. This change improves the readability and maintainability of the code.
…airs

The _build_error_string_from_matching_pairs method in the Component class had a formatting issue when input types were empty. This commit fixes the issue by adding a check for empty input types and providing an empty list as a fallback. This improves the accuracy and readability of the error string generated by the method.
@ogabrielluiz ogabrielluiz merged commit 3e19a3f into main Aug 28, 2024
28 checks passed
@ogabrielluiz ogabrielluiz deleted the feat/auto-output branch August 28, 2024 19:31
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
* refactor: Add _find_matching_output_method to Component class

* feat: allow components to be passed in set method

* fix: Add test for graph set method with valid component

* set value variable to the output callable

* refactor: Update test_component.py to use set_component method

This commit refactors the test_component.py file in the custom_component directory. The test_set_invalid_input() function has been renamed to test_set_component() to better reflect its purpose. Additionally, the test_set_component() function now sets the agent parameter using the set_component() method instead of raising a ValueError. This change improves the readability and maintainability of the code.

* refactor: Fix formatting issue in _build_error_string_from_matching_pairs

The _build_error_string_from_matching_pairs method in the Component class had a formatting issue when input types were empty. This commit fixes the issue by adding a check for empty input types and providing an empty list as a fallback. This improves the accuracy and readability of the error string generated by the method.

* fix(component.py): add validation to ensure output method is a string to prevent potential runtime errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants