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

Add default help user logo and help_text to ChatFeed #6311

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Feb 6, 2024

In many of the panel-chat-examples, I have to do something like:

chat_interface = pn.chat.ChatInterface()
chat_interface.send("Instructions for users", user="System")
chat_interface.serialize()[1:]

Which can be a tad tedious when repeatedly done; this PR adds a convenient way to include a help message, and exclude users from serialization. Additionally, it makes the distinction between a "help" message vs a "system" message (which presumably could be a system prompt)

chat_interface = pn.chat.ChatInterface(help_text="Instructions for users")
chat_interface.serialize()

@ahuang11 ahuang11 changed the title Add help message Add default help user logo and help_text Feb 6, 2024
@ahuang11 ahuang11 changed the title Add default help user logo and help_text Add default help user logo and help_text to ChatFeed Feb 6, 2024
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (075b5ae) 84.19% compared to head (5f405d2) 82.65%.
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6311      +/-   ##
==========================================
- Coverage   84.19%   82.65%   -1.55%     
==========================================
  Files         301      305       +4     
  Lines       45200    45456     +256     
==========================================
- Hits        38058    37570     -488     
- Misses       7142     7886     +744     
Flag Coverage Δ
ui-tests 38.54% <20.00%> (-2.19%) ⬇️
unitexamples-tests 71.68% <100.00%> (-0.15%) ⬇️

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 d35ad7a into main Feb 14, 2024
12 of 15 checks passed
@philippjfr philippjfr deleted the add_help_text branch February 14, 2024 10:24
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.

2 participants