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
> In a fantastical steampunk world, Simon Willison decided to merge an old MP3 recording with slides from the talk using iMovie. After exporting the slides as images and importing them into iMovie, he had to disable the default Ken Burns effect using the "Crop" tool. Then, Simon manually synchronized the audio by adjusting the duration of each image. Finally, he published the masterpiece to YouTube, with the whimsical magic of steampunk-infused illustrations leaving his viewers in awe.
102
107
103
-
## System templates
108
+
### System templates
104
109
105
110
When working with models that support system prompts (such as `gpt-3.5-turbo` and `gpt-4`) you can set a system prompt using a `system:` key like so:
106
111
@@ -116,7 +121,7 @@ system: You speak like an excitable Victorian adventurer
116
121
prompt: 'Summarize this: $input'
117
122
```
118
123
119
-
## Additional template variables
124
+
### Additional template variables
120
125
121
126
Templates that work against the user's normal input (content that is either piped to the tool via standard input or passed as a command-line argument) use just the `$input` variable.
122
127
@@ -157,7 +162,7 @@ I got this:
157
162
> My previous test subject seemed to have learned something new about iMovie. They exported keynote slides as individual images [...] Quite impressive for a human.
158
163
159
164
(prompt-default-parameters)=
160
-
## Specifying default parameters
165
+
### Specifying default parameters
161
166
162
167
You can also specify default values for parameters, using a `defaults:` key.
163
168
@@ -185,7 +190,15 @@ I got this:
185
190
186
191
> Text, summarize in Yoda's voice, I will: "Hmm, young padawan. Summary of this text, you seek. Hmmm. ...
187
192
188
-
## Setting a default model for a template
193
+
### Configuring code extraction
194
+
195
+
To configure the {ref}`extract first fenced code block <usage-extract-fenced-code>` setting for the template, add this:
196
+
197
+
```yaml
198
+
extract: true
199
+
```
200
+
201
+
### Setting a default model for a template
189
202
190
203
Templates executed using `llm -t template-name` will execute using the default model that the user has configured for the tool - or `gpt-3.5-turbo` if they have not configured their own default.
0 commit comments