-
-
Notifications
You must be signed in to change notification settings - Fork 359
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 to disable providers using traitlets config #313
Comments
@krassowski We are also inclined to add this feature, but were thinking it would be implemented in our current configuration system under |
Thank you for a super quick reply!
I thought you already do? > type(AiExtension)
traitlets.traitlets.MetaHasTraits I understand that getting familiar with traitlets may have been a steep curve, and those are not always the best solution but I don't yet see how those would be a problem here specifically. I of course respect that you may prefer the other way for consistency, though again users may prefer traitlets. I don't think it is a strong preference for users though - having it either way would be better than not having it at all :)
Depends on what you mean by mutable. In a sense of hot reloading? Right. In a sense of being immutable - nope (this is how IPython runtime reconfiguration works) - so it would depend on how changes are made.
Kind of. If we also wanted to have What do you think? |
But this shows that existing integration is friction less and does not require any problematic meta classes patterns, right?
Sure! Traitlets implement the observer pattern which is used in IPython to do this kind of reconfiguration. User could just import
That's great! |
@krassowski thanks for opening this issue, some of these ideas have been bouncing around in my head, but we hadn't talked about it yet. Very helpful! A few comments:
|
@ellisonbg Thanks for your input. I see your perspective and how this configuration doesn't need to be dynamic. If that's the case, then indeed we can use the |
Problem
jupyter_server_config.py
or.json
files), providing a standardisation across projects and extensions with know format, location and runtime type checkingCurrently the providers are enabled by entrypoints which is convenient for extending but not to for configuring; it is much more labour intensive to disable an entry point, and disabling all entrypoints which are shipped today does not guarantee that new providers added in future versions will be disabled too.
Proposed Solution
AiExtension.allowed_providers: List[str]
AiExtension.blocked_providers: List[str]
ModelProviderHandler
and friends respect these settingsThe text was updated successfully, but these errors were encountered: