-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use dataclass models in YChat #119
Conversation
Bumping CI |
Thanks @dlqqq for the review. |
Co-authored-by: david qiu <[email protected]>
@dlqqq In this PR I changed It will collide with jupyterlab/jupyter-ai#1151, which uses this method. I can revert this change. |
Fixes #115
The
YChat
usesdataclass
models for the messages users. TheUser
model is inherited (without change) from the jupyter server model.It does not use
dataclass
for metadata, because it can contain anything. Only theid
field is used byjupyterlab_chat
.This PR also save the chat file as a more readable JSON file.
EDIT: it also avoids getting all the messages in the
set_message()
method, where the index is already known (for performance issue on large file).