-
Notifications
You must be signed in to change notification settings - Fork 1.7k
enhance: truncate long toolkit responses #3604
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
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a7m-1st
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected thanks @Wendong-Fan. On the event the max_tokens is too small the model was able to recognize the limitation and adjust by calling the tool again to get relevant details.
{'role': 'tool', 'content': "\n\n[TRUNCATED] Tool 'shell_exec' output truncated (2463 > 450 tokens). Tool executed successfully.total 31M\ndrwxr-xr-x 1 root root 4.0K Dec 16 12:14 .\ndrwxr-xr-x 1 root root 4.0K Oct 13 14:02 ..\n-rwxr-xr-x 1 root root
55K Jun 22 16:21 [\n-rwxr-xr-x 1 root root 15K Jun 5 2025 addpart\n-rwxr-xr-x 1 root root 19K Oct 22 2024 apt\n-rwxr-xr-x 1 root root 87K Oct 22 2024 apt-cache\n-rwxr-xr-x 1 root root 27K Oct 22 2024 apt-cdrom\n-rwxr-xr-x 1 root root
31K Oct 22 2024 apt-config\n-rwxr-xr-x 1 root root 51K Oct 22 2024 apt-get\n-rwxr-xr-x 1 root root 28K Oct 22 2024 apt-key\n-rwxr-xr-x 1 root root 55K
Oct 22 2024 apt-mark\n-rwxr-xr-x 1 root root 35K Jun 22 16:21 arch\nlrwxrwxrwx 1 root root 21 Apr 8 2024 awk -> /etc/alternatives/awk\n-rwxr-xr-x 1 root root 55K Jun 22 16:21 b2sum\n-rwx",
'tool_call_id': 'tooluse_zMAPPTzDTT2zgqc2aSuI9g'}
Here is the ChatAgent response:Perfect! Now I can see everything clearly. \n\n The solution I used: |
Description
Describe your changes in detail (optional if the linked issue already contains a detailed description of the changes).
Checklist
Go over all the following points, and put an
xin all the boxes that apply.Fixes #issue-numberin the PR description (required)pyproject.tomlanduv lockIf you are unsure about any of these, don't hesitate to ask. We are here to help!