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: fixes langchain tool calling agent component toolkit #5878

Merged
merged 12 commits into from
Jan 31, 2025

Conversation

edwinjosechittilappilly
Copy link
Collaborator

This pull request includes several changes to the src/backend directory, focusing on improving the functionality and organization of the langflow components and tests. The most important changes include adding a new method to convert components to toolkits, importing necessary modules, and reorganizing imports in test files.

Improvements to langflow components:

Reorganization of imports in test files:

@edwinjosechittilappilly edwinjosechittilappilly changed the title fix: Fix langchain tool calling agent component toolkit fix: fixes langchain tool calling agent component toolkit Jan 22, 2025
@edwinjosechittilappilly edwinjosechittilappilly marked this pull request as ready for review January 22, 2025 20:20
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 22, 2025
@github-actions github-actions bot added the bug Something isn't working label Jan 22, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 22, 2025
@edwinjosechittilappilly
Copy link
Collaborator Author

@ogabrielluiz I added toolkit to the component, since the base class was being used in the agent component. Hence to prevent further issues I added the toolkit in the toolcalling agent component itself. This would override the base class toolkit.

@edwinjosechittilappilly edwinjosechittilappilly added the DO NOT MERGE Don't Merge this PR label Jan 22, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 22, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 22, 2025
@edwinjosechittilappilly
Copy link
Collaborator Author

edwinjosechittilappilly commented Jan 22, 2025

@ogabrielluiz I am not sure if this is the best approach. If not urgent lets keep this PR for next release?
If any user faces issues with tool calling agent, we can ask them to use agent component.
looking forward to your suggestion.

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 22, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jan 22, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 22, 2025
Copy link

codspeed-hq bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #5878 will not alter performance

Comparing fix-langchain-tool-calling-agent-componet-toolkit (0ef557d) with main (5804336)

Summary

✅ 9 untouched benchmarks

@edwinjosechittilappilly edwinjosechittilappilly removed the DO NOT MERGE Don't Merge this PR label Jan 22, 2025
@ogabrielluiz
Copy link
Contributor

Hey @edwinjosechittilappilly

Let's use #6036 instead of adding a build_agent check.

@edwinjosechittilappilly
Copy link
Collaborator Author

@ogabrielluiz, do we need to edit this PR Based on the following PR?

#6036

We might be able to test this scenario once 6036 is merged. It might solve the issue. If not, I shall reopen this PR.

PR #6036 is a good support for this PR.

@ogabrielluiz
Copy link
Contributor

Yes. You should remove the change to get_tools and add tool_mode=False in the build_agent output.

@edwinjosechittilappilly
Copy link
Collaborator Author

Yes. You should remove the change to get_tools and add tool_mode=False in the build_agent output.

Sounds Good!
I shall update those changes in this PR.

@ogabrielluiz ogabrielluiz force-pushed the fix-langchain-tool-calling-agent-componet-toolkit branch from 923450b to 10337da Compare January 31, 2025 12:44
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 31, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 31, 2025
@ogabrielluiz ogabrielluiz dismissed anovazzi1’s stale review January 31, 2025 12:50

We should do this in another PR

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 31, 2025
@ogabrielluiz ogabrielluiz added this pull request to the merge queue Jan 31, 2025
Merged via the queue into main with commit e15fddd Jan 31, 2025
44 of 45 checks passed
@ogabrielluiz ogabrielluiz deleted the fix-langchain-tool-calling-agent-componet-toolkit branch January 31, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DO NOT MERGE Don't Merge this PR 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.

3 participants