obsidian-textgenerator-plugin
obsidian-textgenerator-plugin copied to clipboard
[Feature Requests] Template-related features
Might be a bit premature since it looks like templates are not fully out yet, apologies if some of these are already planned. Some of these are probably bugs.
Escapes and text replacements:
- custom escape characters, through helper function
- substring helper function, and corresponding documentation :P
- text search and replace
- text search and index
Children:
5. avoiding overlap for children
; currently the same child can be included multiple times in the children
array
6. *option to avoid self-child; currently the parent note can be included in the children
array
7. option to generate headings
for children
8. including children of children; currently child notes of children are inaccessible
*has workaround using #if
, but imo having this option is better
Links and Embeds:
9. including parent notes of referenced blocks; internal links of the form [[note#^blockref]]
do not include their corresponding note in children
10. including referenced blocks; the contents of blocks of the form [[note#^blockref]]
seem to not be included anywhere
11. option to include or exclude referenced blocks from children
;
12. option to replace embedded internal links with their contents; of the form ![[note]]
or ![[note#^blockref]]
13. *option to remove or replace embedded internal links to non-notes; for instance ![[image.png]]
*has workaround if text search and replace or text search and index + substring are implemented, but cumbersome
Quality of Life & misc:
14. option to exclusively use {{headings.heading}}
instead of {{heading}}
, to ensure consistency (eg for a heading called "context")
15. *option to show multiple responses to pick and choose between them; ie the n
parameter from OpenAI's Completion API
16. *option to retrieve and view logprobs
from OpenAI, as well as the tokens
17. insert template to clipboard
*probably a lot of work
The Part where I Write a Lot (More):
Hi! I'm loving this plugin so far, and really appreciate what you're doing! I'm loving the concept of templates so far, but a lot of these features will make it more practical for my use case. I hope you'll consider implementing some of these. Here I'll try to explain motivations and/or vague potential implementation features:
1: default is HTML escaping, but to my knowledge OpenAI works with JSON(L) format, and I'm not sure if escaping for JSON currently exists? can replace with a simple helper for JSON escaping, but I suggested a search-and-replace since it could work for all potential future AI-as-a-service APIs
8: potentially a field in the plugin options, but also consider writing it as a helper function, although I don't know if helpers are allowed to have side effects. This helper function takes an integer max_depth
10: consider a references
that is separate from children
. Also consider generating references
for children (11).
12, 13: could group .txt
under 12 instead of 13, although that's probably unimportant for most people
14: please
15, 16: this would imply the creation of a temporary file at best, or at worst a custom popup/window; additionally for the vast majority of people this is probably completely irrelevant. Personally, seeing logprobs for longform text allows me to read into the intent of GPT, and sometimes good information can be found by looking at what GPT would have said. Still, not exactly the most commonly used feature, and (17) is a good enough replacement where I can just paste into the OpenAI playground.