-
Notifications
You must be signed in to change notification settings - Fork 563
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
Update token_handler.py #791
Conversation
PR Description updated to latest commit (a461c2a)
|
PR Review
✨ Review tool usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
With a configuration file, use the following template:
See the improve usage page for a more comprehensive guide on using this tool. |
Type
enhancement, bug_fix
Description
_get_system_user_tokens
to return-1
when an exception occurs, enhancing robustness.count_tokens
method.Changes walkthrough
token_handler.py
Enhance Error Handling in Token Calculation
pr_agent/algo/token_handler.py
_get_system_user_tokens
with atry-except block.
-1
if an exception occurs during token calculation.count_tokens
method, just formattingadjustment.