CtrlAltFocus / obsidian-plugin-auto-tag

Easily generate relevant tags for your Obsidian notes.
https://twitter.com/ctrl_alt_focus
MIT License
43 stars 6 forks source link

Unchecking prefix returns empty array #9

Open Johannnnes opened 10 months ago

Johannnnes commented 10 months ago

When unchecking the "#autotag" prefix and simultaneous unchecking "autotags:" OpenAI returns an empty array...

With prefix: [17/10/2023, 00:02:41] [autotag][dbg] Finding tags for user-selected text (696 chars) [17/10/2023, 00:02:43] [autotag][dbg] OpenAI API suggested tags: "{\"tags\":[\"Obsidian\",\"plugins\",\"file format\",\"canvas\",\"JSON\",\"Dataview\",\"query\",\"Machine Learning\",\"GNN\",\"CNN\",\"productivity\",\"scientific research\"]}"

Without prefix: [17/10/2023, 00:03:18] [autotag][dbg] Finding tags for user-selected text (697 chars) [17/10/2023, 00:03:20] [autotag][dbg] OpenAI API suggested tags: "{\"tags\":[]}"

CtrlAltFocus commented 10 months ago

Hi, There is a problem with OpenAI sometimes not suggesting any tags. For a same note, sometimes i get 2, sometimes 5, but rarely I get none. If you get no tags in return, you can retry.

I will see how that can be improved. It happens more for short parts of selected text or short notes. If you have an example for which you mostly get 0 tag suggestions, that would be helpful in improving this.

This also gives me some ideas to improve the user experience: add a retry button, if there were no tags suggested (or less than 2 for example).