pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.6k stars 409 forks source link

[SUPPORT] AI integration question #3060

Closed anmsh closed 1 month ago

anmsh commented 1 month ago

Question

Hello again after a while. Thank you for AI integration. I was able to do some auto complete and also get it to write some code for some boilerplate code. I am wondering if it is possible to improve the text content of a document.

Let's say I have this piece of text:

The purpose of this document is to list down all the pending tasks related to this machine. Once a task is completed, it will be marked as such and documented and published into my so that it serves as a public record of the project's progress.

I want to improve this with better grammar and structure. Things I tried:

  1. Selecting the whole text and pressing ctrl-space — it either repeats the same text or adds more text which it thinks will be a logical continuation.
  2. Write a line on top of this text like Improve this document and press ctrl-space on it — which just rewrites it to say something to the effect of Enhance the clarity of the document

When I used groq/mixtral, it did give me points on how I could achieve without actually changing any content.

pbek commented 1 month ago

This sounds like something I did with https://github.com/qownnotes/scripts/blob/master/ai-text-tool/ai-text-tool.qml, but just with a custom action and a select box to choose what action you want to apply.

anmsh commented 1 month ago

I overlooked this script. I played with for a while and it seems to work well with both LLMs. It does what I need at the moment. Feel free to ignore this but a suggestion on top of my head is to offer a preview / diff within the result window to understand what changed.

pbek commented 1 month ago

Do you mean a diff between the selected text and the text of the dialog... Hm, depends on the size of the selected text. You could consult an external diff tool and output the text somewhere for the script. ️🤷🏻