-
Notifications
You must be signed in to change notification settings - Fork 8
automatically execute tools #30
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… tool calling - Updated the _format_tool_response method to accept additional parameters: call_tools (defaulting to True) and tools (optional). - Modified the _model_call and other related methods to pass these parameters, allowing for conditional tool invocation based on the call_tools flag. - Improved handling of tool responses to align with the updated functionality.
…calls are made - Added a check in the LLM class to return the content of the response directly if no tool calls are present in the response. This improves the handling of responses when tools are not utilized, ensuring more straightforward output in such cases. - Removed the unnecessary breakpoint for cleaner code.
…nagement - Updated the _format_tool_response method to use lit_tools instead of tools for better clarity and functionality. - Enhanced the _model_call method to pass lit_tools, ensuring consistent handling of tool calls. - Removed unnecessary breakpoint and improved exception handling in the LLM class. - Adjusted related methods to streamline the response processing and maintain compatibility with the updated tool structure.
…logic - Added a check to return an empty string if no tool calls are present in the response. - Updated the _model_call method to return a single result directly if only one result is found, enhancing the response handling. - Introduced a new test to validate the behavior of the model_call method with tools and auto call functionality.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==================================
- Coverage 89% 88% -0%
==================================
Files 6 6
Lines 411 417 +6
==================================
+ Hits 364 368 +4
- Misses 47 49 +2 🚀 New features to boost your workflow:
|
robTheBuildr
approved these changes
Aug 4, 2025
- Updated the _format_tool_response method to return a JSON string for tool responses, ensuring consistent output. - Modified the call_tool method to return a string instead of a list, enhancing clarity in response handling. - Adjusted the return logic in call_tool to always return a JSON string when multiple results are present, improving data consistency.
Borda
approved these changes
Aug 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting
What does this PR do?
Users will be able to execute tool along in the
chat
method.PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃