polywock / ask-screenshot

Issue Tracker for GPT Screenshot extension.
9 stars 1 forks source link

Dynamic placeholders #2

Closed PiotrSss closed 7 months ago

PiotrSss commented 7 months ago

Hi! I love these extensions! I'd like to ask for one enhancement: a dynamic placeholder for input data in prompt templates, e.g. {{input}} or {{text}}.

It's not an issue with larger models, but the free ones are sometimes confused if the input data is not wrapped in some kind of delimiters, XML tags or triple quotes. These delimiters could be hardcoded by you, but it's less flexible than giving us the option to decide where the input data should be placed. Sometimes it's better to place it before or in the middle of a prompt. The default shouldn't change - if there is no {{text}} just add selection at the end of the prompt.

polywock commented 7 months ago

Glad you're finding the extension helpful!

Thankfully, this feature is already possible through the {{ selection }} command. It works exactly as you described. For example...

Rewrite the following text:

{{selection}}

Make it appropiate for the workplace. 
PiotrSss commented 7 months ago

Brilliant, thank you!