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

fix: Correct recursion error on load in JupyterHub #178

Merged
merged 2 commits into from
May 22, 2023
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def get(self, *args, **kwargs):
res = super().get(*args, **kwargs)
await res

def get_current_user(self) -> ChatUser:
def get_chat_user(self) -> ChatUser:
"""Retrieves the current user. If collaborative mode is disabled, one
is synthesized from the login."""
collaborative = self.config.get("LabApp", {}).get("collaborative", False)
Expand Down Expand Up @@ -189,7 +189,7 @@ def open(self):
"""Handles opening of a WebSocket connection. Client ID can be retrieved
from `self.client_id`."""

current_user = self.get_current_user().dict()
current_user = self.get_chat_user().dict()
client_id = self.generate_client_id()

self.chat_handlers[client_id] = self
Expand Down