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

Allow developers to override built-in chat commands #507

Open
JasonWeill opened this issue Dec 6, 2023 · 2 comments
Open

Allow developers to override built-in chat commands #507

JasonWeill opened this issue Dec 6, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@JasonWeill
Copy link
Collaborator

Problem

After #398 is merged, developers can only add slash commands, and cannot modify existing slash commands.

Proposed Solution

Allow developers to modify existing slash commands in the Jupyter AI chat interface.

Additional context

We should also update the help message if a built-in chat command is rewritten or disabled; see #436.

@krassowski
Copy link
Member

I was surprised to see that this was left out of #398. I really looked forward to the ability to fully customise the slash commands and viewing the PR in early phases I understood that it will enable that. I would like to quote @Zsailer suggestion from that PR:

override builtin commands to do bad or unexpected things, which would hurt trust in Jupyter AI.

Sure, but it is Python and a bad actor can simply replace jai_chat_handlers setting from their own package/extension... which is exactly what I would to do to replace these values as a "good actor" 😉. Unfortunately, you can't get around this hackery.

For my immediate use-case, I want to disable some of the default chat handlers (not necessarily replace them) because they don't work well on my system. This already requires me to override the jai_chat_handlers setting. In a not-too-distance future, I could see replacing handlers with my own version that works for my system.

For the "good actors" who want to replace the default handlers—if you allows them to override using the entry-point system, you can detect this and log a warning to the user that the default command is being replaced.

Originally posted by @Zsailer in #398 (comment)

Just saying that I fully agree with every word here.

@ddnimara
Copy link

ddnimara commented Jul 9, 2024

Hi!

I have looked over the plan for the upcoming release and could not find any mention about the status of this issue. Thus far, using jupyter-ai has been great and our users are very happy with it, but we feel it would be even better if we could substitute some of the built-in chat handlers. For instance, we could enable the RAG functionality offered by the /ask command as the default one, so that a user does not have to explicitly write /ask in front of every interaction with the chatbot.

How does this functionality fit within the existing timeplan/vision of jupyter-ai? Is someone working actively on it? Would a PR be welcomed, or are other features prioritized for now?

Side note: I am also curious on why this option is not allowed? We are explicitly checking for it (here, and here) but I am not sure why we are limiting this tool's flexibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants