gpt4all
gpt4all copied to clipboard
Feature to attach a file when sending a message to LLM.
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
- [x] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] I have added thorough documentation for my code.
- [ ] I have tagged PR with relevant project labels. I acknowledge that a PR without labels may be dismissed.
- [ ] If this PR addresses a bug, I have provided both a screenshot/video of the original bug and the working solution.
| :rocket: | This description was created by Ellipsis for commit d3685e798545f774ff60bb77fbf1bae2570ad82c |
|---|
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 in main.cpp.
Key points:
- Added
icons/paperclip.svgtogpt4all-chat/CMakeLists.txt. - Enabled QML file reading in
main.cppby settingQML_XHR_ALLOW_FILE_READ. - Updated
ChatView.qmlto include aFileDialogfor selecting text files and aMyToolButtonfor attaching files. - Modified
ChatView.qmlto append file contents to the message text before sending to the LLM.
Generated with :heart: by ellipsis.dev
Screen capture showing interaction: muted text of the filename following the "You" in the conversation area, and a paperclip icon on the right side of the textinput field.
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.