Handling Warnings and Errors from the Code Interpreter Tool in SK Agents #12524
CristinaStn
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When running complex Python code inside the Code Interpreter, we’ve observed that warnings and errors from the Python runtime are streamed directly back to the agent—and consequently shown to the end-user.
Example
Query to the agent:
"Generate a sunburst chart based on job titles in the report."
Expected behaviour:
The agent explains what a sunburst chart is and the steps it will take to generate it.
Actual behavior:
While streaming the response, the agent emits chunks of messages that include internal warnings from the Code Interpreter, such as:
/home/sandbox/.local/lib/python3.11/site-packages/plotly/express/_core.py:1637: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. df_all_trees = df_all_trees.append(df_tree, ignore_index=True) /home/sandbox/.local/lib/python3.11/site-packages/plotly/express/_core.py:1637: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. df_all_trees = df_all_trees.append(df_tree, ignore_index=True)
(same warning message, duplicated)
Finally, the run fails with a non-intuitive error "Run failed with status: failed for agent GeneralAssistant and thread thread_PTCvyjhsL3dzqtASi7bH3TRp" with Last Error: Sorry, something went wrong.
Questions:
(e.g., something similar to the Filter concept used in Plugins?)
Beta Was this translation helpful? Give feedback.
All reactions