-
Notifications
You must be signed in to change notification settings - Fork 425
TLK-2090 tool errors processing #861
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
TLK-2090 tool errors processing #861
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #861 +/- ##
==========================================
- Coverage 78.19% 77.97% -0.23%
==========================================
Files 259 259
Lines 11090 11123 +33
==========================================
+ Hits 8672 8673 +1
- Misses 2418 2450 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rrors-from-tool-errors # Conflicts: # src/backend/tools/web_scrape.py
…rrors-from-tool-errors
…rrors-from-tool-errors
…rrors-from-tool-errors
…rrors-from-tool-errors # Conflicts: # src/backend/tools/base.py # src/backend/tools/google_search.py
tianjing-li
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.
This is great, thank you!
…rrors-from-tool-errors
Tools error processing
AI Description
This PR introduces a new
ToolErrorException class insrc/backend/tools/base.py and updates thetool.get_tool_error() function to handle this exception. TheToolErrorExceptionclass is imported intosrc/backend/chat/custom/tool_calls.pyand used to handle exceptions in the_call_tool_async()` function.The PR also updates the
ToolError class insrc/backend/tools/base.pyto include adetails` attribute, which is used to provide additional information about the error. This change is reflected in various files throughout the codebase, including:src/backend/tools/brave_search/tool.pysrc/backend/tools/calculator.pysrc/backend/tools/files.pysrc/backend/tools/google_drive/tool.pysrc/backend/tools/google_search.pysrc/backend/tools/hybrid_search.pysrc/backend/tools/lang_chain.pysrc/backend/tools/python_interpreter.pysrc/backend/tools/slack/tool.pysrc/backend/tools/tavily_search.pysrc/backend/tools/web_scrape.pysrc/community/tools/arxiv.pysrc/community/tools/clinicaltrials.pysrc/community/tools/connector.pysrc/community/tools/llama_index.pysrc/community/tools/pub_med.pysrc/community/tools/wolfram.pyAdditionally, the PR updates the
ToolErrorclass to include adetailsattribute, which is used to provide additional information about the error. This change is reflected in various files throughout the codebase, including:src/backend/tests/unit/tools/test_calculator.pysrc/backend/tests/unit/tools/test_lang_chain.pysrc/backend/tools/base.pyis updated to include a newToolErrorExceptionclass and adetailsattribute in theToolErrorclass.src/backend/chat/custom/tool_calls.pyis updated to handle the newToolErrorExceptionclass.src/backend/tools/brave_search/tool.py,src/backend/tools/calculator.py,src/backend/tools/files.py,src/backend/tools/google_drive/tool.py,src/backend/tools/google_search.py,src/backend/tools/hybrid_search.py,src/backend/tools/lang_chain.py,src/backend/tools/python_interpreter.py,src/backend/tools/slack/tool.py,src/backend/tools/tavily_search.py,src/backend/tools/web_scrape.py,src/community/tools/arxiv.py,src/community/tools/clinicaltrials.py,src/community/tools/connector.py,src/community/tools/llama_index.py,src/community/tools/pub_med.py, andsrc/community/tools/wolfram.pyare updated to handle the newToolErrorclass and itsdetailsattribute.src/backend/tests/unit/tools/test_calculator.pyandsrc/backend/tests/unit/tools/test_lang_chain.py`` are updated to handle the newToolErrorclass and itsdetails` attribute.src/interfaces/assistants_web/src/components/MessageRow/ToolEvents.tsxis updated to handle the newToolErrorclass and itsdetailsattribute.src/interfaces/assistants_web/src/hooks/use-chat.tsis updated to handle the newToolErrorclass and itsdetailsattribute.