-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Make help message template configurable #938
Conversation
d404cf2
to
7ea37d5
Compare
hello, since you are making this change, it seems like perhaps we can resolve #851 by splitting the welcome and help message. I think it would make more sense to make the welcome message configurable via this traitlet while having the help chat handler define the help message. what do you think? |
@michaelchia I agree that we should split the welcome message and the help message in the future! This PR doesn't exclude that possibility; it's merely making the help message configurable. |
I think this also fixes #927 |
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.
- Reviewed code, LGTM.
- Also tested the branch and it works as expected.
- I will add documentation for this. Can be added around the beginning of the section "The chat interface" which also currently does not include the image of the slash commands.
Updated users `index.md` to explain how to create a custom `config.py` to prepare a custom help message.
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.
* make help message template configurable * pre-commit * fix unit tests * pre-commit * Added documentation for the custom help template Updated users `index.md` to explain how to create a custom `config.py` to prepare a custom help message. --------- Co-authored-by: Sanjiv Das <srdas@scu.edu>
Description
traitlets
.HelpChatHandler
to theBaseChatHandler
base class./clear
also needs to be able to send a help message. Since this functionality is shared by multiple chat handlers, it seemed like better practice to implement this exactly once in a base class and allow any chat handler to send a help message.Demo
Testing
To reproduce the above demo:
config.py
file in your current directory with the contents:jupyter lab --config=config.py
.Additional notes
I've added a new
TestProviderAskLearnUnsupported
class in thejupyter_ai_test
package for local testing. You can verify that after switching to this model in the settings and running/clear
,/ask
and/learn
do not show up in the help message as they are listed inunsupported_slash_commands
.