Allow custom prompt for users to generate content through GPT

Description

As a user I would like to have the ability to add prompt for generating content through openAI…

For example if there was a third option in this menu which opened a text box for me to type my own prompt. So after “Summarise” and “Fix spelling” there could be a 3rd option “Enter your own prompt”

image

For example if I am making a note to learn spanish it would be helpful for me to type in “Give me list of 10 spanish greetings” or highlight something I wrote in spanish and type “Check my sentence if there are mistakes in it.”

Impact

I think this can greatly enhance user experience and productivity for all users of AppFlowy.

Additional Context

I am not proficient in flutter but I have experience with JavaScript and Python. But I am currently taking a look at getting started guide for development, may be I can implement something like this?

I think it would make sense if it simply worked like all of the current AI features, where you make a selection, and then you have something like “Generate from selection”.

Thank you for your reply! I had the same thought as well.

My personal use case was something like this: I wanted to highlight a list of 10 items where each item in the list was as follows.

Sentence1 - Sentence1 in German that I did myself.
Sentence1 - Sentence2 in German that I did myself.

Now, if I wanted to use GPT to highlight my mistakes in bold, I would need to add a line “Check the following translations and highlight my mistakes in bold” at the end or beginning before selecting the whole text, which is not a problem but may not be as intuitive, I think.

But I admit that just generating content from selection is more straightforward and will be fine for me as a user :slight_smile:

While I’m on the topic, my personal use case assumes that we can insert markdown-formatted text in AppFlowy, but is this really the case? I recently tried to copy a list from ChatGPT to AppFlowy, and it did not copy. I assumed this was because copying from Markdown is probably not yet supported

I’m not entirely sure I understand, in your scenario you want to “highlight” mistakes in bold, but isn’t the fix spelling sufficient for your usecase?

Unfortunately in my personal use case it was more than spelling. it was about changing grammar and semantics of the written text.

The clock is ticking on the wall : Die Uhr tickt um der Wand.

In above sentence “um” is grammatically incorrect. It should be “an”, So I would like to highlight it and say “Give me correct sentence” which ideally should insert as follows.

If I highlight the german part of the sentence in AppFlowy and use fix spelling menu, it gives me following.

image

Compare this to a prompt i made for language helper.

image

So if we had an option to enter a custom prompt so user can run it against any highlighted text it would be really helpful. Additionally if user can save a prompt OR we can show recently used prompt, it will be a really good addition.

Actually I was able to perform this exact thing in one other commercial editor which is similar to AppFlowy. However, i like the idea of using my opensource and having editor locally hosted so I switched to AppFlowy and then realised that this feature could possibly be implemented in AppFlowy too.