Skip to content
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

Elaborate on callback exception summary #6046

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 14, 2023

Based on feedback from
https://discourse.holoviz.org/t/chatinterface-streaming-error-with-langchain/6589/4
"""
Thank you for your help. Did not know about callback_exception=“verbose”
"""

and
https://www.youtube.com/watch?v=mFmPDyLlj1E:
"""
The simple case works, but when I ask my agents to write code, I get an error in Panel chat. I know the code has run successfully by looking at the terminal. But in the Panel chat it shows a message with Avatar symbol as red X, avatar name 'Exception', and the message content is just the literal string 'name'.
"""

I think users get stuck when errors occur; this PR elaborates on next steps to unblock them.

image
import panel as pn
pn.extension()

def callback(content, user, instance):
    1 / 0

pn.chat.ChatInterface(callback=callback).servable()

Eventually, I think I want to allow users to add a custom exception handler #6047

@ahuang11 ahuang11 changed the title Add elaborate on callback exception summary Elaborate on callback exception summary Dec 14, 2023
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3448cdd) 84.67% compared to head (7587ac7) 84.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6046      +/-   ##
==========================================
- Coverage   84.67%   84.64%   -0.04%     
==========================================
  Files         291      291              
  Lines       43816    43816              
==========================================
- Hits        37101    37087      -14     
- Misses       6715     6729      +14     
Flag Coverage Δ
ui-tests 40.64% <0.00%> (-0.01%) ⬇️
unitexamples-tests 72.83% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit b9b431b into main Dec 15, 2023
13 checks passed
@philippjfr philippjfr deleted the elaborate_callback_exception branch December 15, 2023 00:12
philippjfr pushed a commit that referenced this pull request Dec 15, 2023
* Add elaborate on callback exception summary

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants