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

Document how to create completions using full notebook content #777

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not filter the settings object just yet
Depending on the order in which extensions are initialized
`jupyter_server_ydoc` may or may not be there; instead
we may want to define a custom proxy which would restrict access
on access to `__getitem__()`
  • Loading branch information
krassowski authored and dlqqq committed Jun 6, 2024
commit 02d5ca2974d64a57e397ce3c4a5b8cb96dad1611
9 changes: 1 addition & 8 deletions packages/jupyter-ai/jupyter_ai/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,7 @@ def initialize_settings(self):
)

# Expose a subset of settings as read-only to the providers
exposed_server_settings = ["jupyter_server_ydoc"]
BaseProvider.server_settings = types.MappingProxyType(
{
key: value
for key, value in self.settings.items()
if key in exposed_server_settings
}
)
BaseProvider.server_settings = types.MappingProxyType(self.settings)

self.log.info("Registered providers.")

Expand Down