-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
fix: fixes langchain tool calling agent component toolkit #5878
Conversation
@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. |
@ogabrielluiz I am not sure if this is the best approach. If not urgent lets keep this PR for next release? |
CodSpeed Performance ReportMerging #5878 will not alter performanceComparing Summary
|
Let's use #6036 instead of adding a |
@ogabrielluiz, do we need to edit this PR Based on the following PR? 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. |
Yes. You should remove the change to |
Sounds Good! |
923450b
to
10337da
Compare
We should do this in another PR
This pull request includes several changes to the
src/backend
directory, focusing on improving the functionality and organization of thelangflow
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:src/backend/base/langflow/components/langchain_utilities/tool_calling.py
: Added imports for_get_component_toolkit
andTool
to support the newto_toolkit
method.src/backend/base/langflow/components/langchain_utilities/tool_calling.py
: Added theto_toolkit
method to convert components to toolkits, allowing for metadata updates and tool retrieval.Reorganization of imports in test files:
src/backend/tests/unit/mock_language_model.py
: Reorganized imports by movingpydantic
imports to the correct location to improve code readability.src/backend/tests/unit/test_schema.py
: Added a newline for better separation of imports, enhancing code readability.