-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Improve support for custom providers #713
Conversation
adds 3 new provider class attributes: 1. `manages_history` 2. `unsupported_slash_commands` 3. `persona`
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.
Code looks good to me, just two small questions/suggestions.
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.
@dlqqq
Works well! Some minor comments, looks good otherwise.
7d68955
to
568adcf
Compare
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.
Looks good!
Thanks for accommodating the suggestions.
@meeseeksdev please backport to 1.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…#715) * improve support for custom providers adds 3 new provider class attributes: 1. `manages_history` 2. `unsupported_slash_commands` 3. `persona` * pre-commit * add comment about jupyternaut icon in frontend * remove 'avatar_path' from 'Persona', drop 'PersonaDescription' * pre-commit
* improve support for custom providers adds 3 new provider class attributes: 1. `manages_history` 2. `unsupported_slash_commands` 3. `persona` * pre-commit * add comment about jupyternaut icon in frontend * remove 'avatar_path' from 'Persona', drop 'PersonaDescription' * pre-commit
Description
Custom providers may lack capabilities that are supported in other providers. Furthermore, some developers writing custom providers want to specify a persona, a custom name and avatar shown on agent replies in the chat UI.
This PR adds 3 new attributes to
BaseProvider
:manages_history
(default:False
): Whether this provider manages its own chat history upstream. This should be set toTrue
if the provider service somehow persists its own chat history without the need for Jupyter AI to pass chat history as part of the prompt.unsupported_slash_commands
(default: empty set): A set of slash commands unsupported by this provider. Unsupported slash commands are not shown in the help message and are not available for use while this provider is selected. For example, if a provider does not support RAG, this should be set to{/learn, /ask}
.persona
(default:None
): A structure that contains a name and avatar that is shown on agent replies in the chat UI. When set toNone
(default), Jupyter AI will choose a persona, which currently defaults toJupyternautPersona
. Otherwise, the persona set on this field takes precedence.