-
Notifications
You must be signed in to change notification settings - Fork 383
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
TLK-2090 tool errors processing #861
Conversation
Codecov ReportAttention: 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. |
…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
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 in
src/backend/tools/base.py and updates thetool.get_tool_error() function to handle this exception. The
ToolErrorExceptionclass is imported into
src/backend/chat/custom/tool_calls.pyand used to handle exceptions in the
_call_tool_async()` function.The PR also updates the
ToolError class in
src/backend/tools/base.pyto include a
details` 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.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
src/community/tools/wolfram.py
Additionally, the PR updates the
ToolError
class to 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/tests/unit/tools/test_calculator.py
src/backend/tests/unit/tools/test_lang_chain.py
src/backend/tools/base.py
is updated to include a newToolErrorException
class and adetails
attribute in theToolError
class.src/backend/chat/custom/tool_calls.py
is updated to handle the newToolErrorException
class.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.py
are updated to handle the newToolError
class and itsdetails
attribute.src/backend/tests/unit/tools/test_calculator.py
andsrc/backend/tests/unit/tools/test_lang_chain.py`` are updated to handle the new
ToolErrorclass and its
details` attribute.src/interfaces/assistants_web/src/components/MessageRow/ToolEvents.tsx
is updated to handle the newToolError
class and itsdetails
attribute.src/interfaces/assistants_web/src/hooks/use-chat.ts
is updated to handle the newToolError
class and itsdetails
attribute.