diff --git a/packages/jupyter-ai/jupyter_ai/handlers.py b/packages/jupyter-ai/jupyter_ai/handlers.py index 7954566a3..7f4fc3ab6 100644 --- a/packages/jupyter-ai/jupyter_ai/handlers.py +++ b/packages/jupyter-ai/jupyter_ai/handlers.py @@ -195,7 +195,10 @@ async def on_message(self, message): # message broadcast to chat clients chat_message_id = str(uuid.uuid4()) chat_message = HumanChatMessage( - id=chat_message_id, time=time.time(), body=chat_request.prompt + id=chat_message_id, + time=time.time(), + body=chat_request.prompt, + client=self.chat_client, ) # broadcast the message to other clients