You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Catch strings of the form `@preset-name` anywhere in the user
prompt and apply the preset in the transform/augment step.
This change is experimental, and will be reverted if there are
unexpected consequences or performance problems.
This change is to make it easy to specify an on-the-fly preset
when the user prompt structure is slightly off. Two examples:
1. When the user prompt is structured as
** Some heading
*Prompt*: @preset-name ...
where the heading is used for structural purposes. Technically
the user prompt begins at the heading, but it's clear from
context that the user intends to apply preset-name to the
message.
2. When the preset specification naturally comes at the end.
<long chunk of text>
What do you make of the above, @explainer?
This also promotes a more conversational preset usage style.
* gptel.el (gptel--transform-apply-preset): Scan the entire user
prompt for `@preset-name` mentions and apply presets as they are
found.
(gptel--fontify-preset-keyword): Fontify all `@preset-name`
mentions in the user prompt.
(gptel--prettify-preset): Adjust for new fontification keyword.
0 commit comments