-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Design a way to attach JSON objects to messages #147
Comments
Thanks @dlqqq for opening this, I can take a look at it. Proposition
{
type: 'file' | 'variable' | 'image',
value: string,
mimetype?: string
} The value could be a path, a variable name or an image content.
I don't think this need for a specific API, the attachments are part of the message. Additional questioning
|
After a very quick test, I agree that we need a sort of API, to be able to add attachments from completion, as expressed at #144 (comment). One option could be to add the attachments (to be send with the next message) to the model. |
I agree that implementing this in |
Problem
There exists a need to design some way of attaching arbitrary JSON objects to messages.
For Jupyter AI v3, we intend to provide
@
commands that allow users to include files & variables from the notebook for context. It would be ideal to retrieve the data of these files/variables directly from the frontend and somehow attach them to the next input for the current user. Defining command handling in the frontend is the most flexible approach, as it allows access to every API provided by Jupyter, not just Python APIs. See this comment for details on the thought process here.Attachments can also later be used to add support for multimodal models which accept both text & images, and may return text & images.
Proposed Solution
Message
to allow a list of attachments, whose contents are arbitrary and JSON-serializable.I'm not sure how the Attachments API should be accessed. I think it would be good to make it accessible from the
YChat
object in the frontend. This way, theYChat
interface provides all of the APIs needed by chat commands.Additional context
I'm currently quite busy with iterating on my existing designs & planning collaborations with new contributors. @brichet I'm assigning this to you as you have the most context on Jupyter Chat, and can help propose better ideas. Feel free to implement a proof-of-concept in a separate PR.
The text was updated successfully, but these errors were encountered: