-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature to attach a file when sending a message to LLM. #2568
Conversation
Signed-off-by: Christopher Barrera <chrisbarrera@icloud.com> Signed-off-by: Christopher Barrera <cb@arda.tx.rr.com>
Signed-off-by: Christopher Barrera <chrisbarrera@icloud.com> Signed-off-by: Christopher Barrera <cb@arda.tx.rr.com>
Signed-off-by: Christopher Barrera <cb@arda.tx.rr.com>
Signed-off-by: Christopher Barrera <cb@arda.tx.rr.com>
- Changing models should also reset the attached file. - The "You" text component should only show the filename on the message where it was attached. Signed-off-by: Christopher Barrera <cb@arda.tx.rr.com>
Hi @chrisbarrera! This is excellent. I have another version of this feature in a private branch that expands on this a bit. I'm going to keep this PR as a draft and merge the two if that is ok? Thanks for doing this! |
Hey @manyoso thanks for the feedback. I am just glad either way that its on the board and y'all will add this as a feature. Feel free to use as little or as much of my implementation as makes sense compared to yours. |
Hey! Today I also wondered why there is no paperclip icon and found this chat. When will it released? |
Update: this feature is still planned but taking some back seat to the tooling work and RAG improvements. The tooling work in turn is taking a back seat to a prerequisite change to our backend that is going to unlock a lot of other stuff. That should be coming in shortly. |
We now have first instance of this working with excel files and issue opened to add more. |
Describe your changes
This pull request introduce a new feature as a (hopefully ready for integration) proof of concept: a paperclip icon on the textinput field right that opens a file dialog to select a text file. This file will be sent to the LLM along with the message entered into the textinput field.
Issue ticket number and link
#2567
Checklist before requesting a review
Summary:
Added a feature to attach a text file when sending a message to the LLM, including UI changes in
ChatView.qml
and enabling QML file reading inmain.cpp
.Key points:
icons/paperclip.svg
togpt4all-chat/CMakeLists.txt
.main.cpp
by settingQML_XHR_ALLOW_FILE_READ
.ChatView.qml
to include aFileDialog
for selecting text files and aMyToolButton
for attaching files.ChatView.qml
to append file contents to the message text before sending to the LLM.Generated with ❤️ by ellipsis.dev