mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 05:36:07 +01:00
Gemini: Allow details tags
This commit is contained in:
parent
20f3a006e2
commit
d949c229cb
3 changed files with 8 additions and 11 deletions
|
@ -27,7 +27,7 @@ I'm getting older, and sites I've been creative on are dying or becoming marketi
|
||||||
|
|
||||||
## Art and Creativity
|
## Art and Creativity
|
||||||
|
|
||||||
* As I travel I like to take 30 second video clips of the peaceful places. I visit the 🧘♂️ [site I made for them](https://30s.byjp.me/) when I want to relax for a moment.
|
* As I travel I like to take 30 second video clips of the peaceful places. I visit the 🧘 [site I made for them](https://30s.byjp.me/) when I want to relax for a moment.
|
||||||
* My friend created a beautiful alphabet, I turned it into a font and 👨🎤 [performance microsite](https://caspian.byjp.me). Read or listen to 📖 [the story right here](/posts/the-beauty-of-type).
|
* My friend created a beautiful alphabet, I turned it into a font and 👨🎤 [performance microsite](https://caspian.byjp.me). Read or listen to 📖 [the story right here](/posts/the-beauty-of-type).
|
||||||
* I once studied biomedical physics, so when I had an MRI of my head I jumped at the opportunity to extract a 3D model of my brain and 🧠 [render it in WebGL online](https://brain.byjp.me/).
|
* I once studied biomedical physics, so when I had an MRI of my head I jumped at the opportunity to extract a 3D model of my brain and 🧠 [render it in WebGL online](https://brain.byjp.me/).
|
||||||
* I built a clockface that counts 🕰 [the seconds since I was born](https://tictoc.byjp.me/). In binary.
|
* I built a clockface that counts 🕰 [the seconds since I was born](https://tictoc.byjp.me/). In binary.
|
||||||
|
|
|
@ -36,9 +36,7 @@ So, with that in mind and my rapidly wilting vegetables in hand, I decided to as
|
||||||
|
|
||||||
I wrote a prompt (and re-wrote it a few times, fiddling with the output) so that I'd end up with a recipe I could use in my favourite recipe app, [Mela](https://mela.recipes). In my prompt I included my general request (including my Zoe-taught guidelines), the full list of ingredients I had to hand, and some details of [Mela's (awesome) file format](https://mela.recipes/fileformat/index.html), so it'd be easy to import and use.
|
I wrote a prompt (and re-wrote it a few times, fiddling with the output) so that I'd end up with a recipe I could use in my favourite recipe app, [Mela](https://mela.recipes). In my prompt I included my general request (including my Zoe-taught guidelines), the full list of ingredients I had to hand, and some details of [Mela's (awesome) file format](https://mela.recipes/fileformat/index.html), so it'd be easy to import and use.
|
||||||
|
|
||||||
<details>
|
{{% details "If you like reading prompts meant for LLMs you can peek in here." %}}
|
||||||
<summary>If you like reading prompts meant for LLMs you can peek in here.</summary>
|
|
||||||
|
|
||||||
> Give me a tasty recipe, that keeps glucose levels low, which I can make with any of the following ingredients I have available:
|
> Give me a tasty recipe, that keeps glucose levels low, which I can make with any of the following ingredients I have available:
|
||||||
>
|
>
|
||||||
> Smoked salmon\
|
> Smoked salmon\
|
||||||
|
@ -58,8 +56,7 @@ I wrote a prompt (and re-wrote it a few times, fiddling with the output) so that
|
||||||
> Tomatoes
|
> Tomatoes
|
||||||
>
|
>
|
||||||
> Give your answer in JSON format with the keys: `id` (a UUID), `title`, `text` (the description of the recipe), `images` (an empty array), `categories` (an empty array), `yield` (the yield as a string, eg. "4 people"), `prepTime` (the prep time, in the format 3h 30m), `cookTime` (the time to cook, in the format 3h 30m), `totalTime` (the total time to cook, in the format 3h 30m), `ingredients` (a list of ingredients, in metric measurements, separated with `\n`), `instructions`(one paragraph per step, separated by `\n\n`. It's very important you don't use numbers), `notes` (written in markdown, containing any other notes if any are needed), and `nutrition` (an empty string).
|
> Give your answer in JSON format with the keys: `id` (a UUID), `title`, `text` (the description of the recipe), `images` (an empty array), `categories` (an empty array), `yield` (the yield as a string, eg. "4 people"), `prepTime` (the prep time, in the format 3h 30m), `cookTime` (the time to cook, in the format 3h 30m), `totalTime` (the total time to cook, in the format 3h 30m), `ingredients` (a list of ingredients, in metric measurements, separated with `\n`), `instructions`(one paragraph per step, separated by `\n\n`. It's very important you don't use numbers), `notes` (written in markdown, containing any other notes if any are needed), and `nutrition` (an empty string).
|
||||||
|
{{%/ details %}}
|
||||||
</details>
|
|
||||||
|
|
||||||
## Importing into Mela
|
## Importing into Mela
|
||||||
|
|
||||||
|
@ -67,8 +64,7 @@ ChatGPT _is_ impressive, in that it did produce a recipe for "Smoked Salmon and
|
||||||
|
|
||||||
{{< figure src="recipe.webp" title="Mela's gorgeous user interface, inviting me to start a-cookin'. If you'd like to try the same recipe (🫣) then you can use the mela recipe data below, or [grab the PDF](recipe.pdf)." alt="A simple and elegant screenshot of the Mela recipe app showing the recipe generated by ChatGPT. You can read the recipe in the PDF linked to in this image's caption.">}}
|
{{< figure src="recipe.webp" title="Mela's gorgeous user interface, inviting me to start a-cookin'. If you'd like to try the same recipe (🫣) then you can use the mela recipe data below, or [grab the PDF](recipe.pdf)." alt="A simple and elegant screenshot of the Mela recipe app showing the recipe generated by ChatGPT. You can read the recipe in the PDF linked to in this image's caption.">}}
|
||||||
|
|
||||||
<details>
|
{{% details "If you're the kind of person who likes reading JSON recipe files (hi friend!), then get a load of this!" %}}
|
||||||
<summary>If you're the kind of person who likes reading JSON recipe files (hi friend!), then get a load of this!</summary>
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -86,10 +82,9 @@ ChatGPT _is_ impressive, in that it did produce a recipe for "Smoked Salmon and
|
||||||
"notes": "* Feel free to adjust the vegetables based on personal preference or availability.\n* This recipe is versatile - you can add additional herbs or spices for extra flavor.\n* Ensure to check the label when purchasing smoked salmon to ensure it doesn't contain added sugars or sauces.",
|
"notes": "* Feel free to adjust the vegetables based on personal preference or availability.\n* This recipe is versatile - you can add additional herbs or spices for extra flavor.\n* Ensure to check the label when purchasing smoked salmon to ensure it doesn't contain added sugars or sauces.",
|
||||||
"nutrition": ""
|
"nutrition": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
{{% /details %}}
|
||||||
|
|
||||||
So, the fact that it looks so good is _definitely_ Mela's fault (did I mention how much I like that app?), but nothing here looked like it'd kill me so I dug out my large skillet and got to work.
|
So, the fact that it looks so good is _definitely_ Mela's fault (did I mention how much I like that app?), but nothing here looked like it'd kill me so I dug out my large skillet and got to work.
|
||||||
|
|
||||||
|
@ -97,7 +92,7 @@ So, the fact that it looks so good is _definitely_ Mela's fault (did I mention h
|
||||||
|
|
||||||
As I followed the recipe (I made sure not to read ahead too closely, to keep the sense of suspense alive) I began to realise ~~ChefGPT's first mistake~~ why a statistical word-picker won't be making your most loved recipes any time soon. It turns out my prompt "with any of the following ingredients I have available" ended up being interpreted more like "using exactly all of these ingredients".
|
As I followed the recipe (I made sure not to read ahead too closely, to keep the sense of suspense alive) I began to realise ~~ChefGPT's first mistake~~ why a statistical word-picker won't be making your most loved recipes any time soon. It turns out my prompt "with any of the following ingredients I have available" ended up being interpreted more like "using exactly all of these ingredients".
|
||||||
|
|
||||||
So I got a _Smoked salmon, Gnocchi, Broccoli, Brussel Sprout, Onion, Sweet Potato, Mushroom, and Butter bean_ stir fry with _Almonds, Sunflower seeds, Hazelnuts, Sweetcorn, Chickpeas, Tuna, and Tomatoes_ on top. 🤷♂️
|
So I got a _Smoked salmon, Gnocchi, Broccoli, Brussel Sprout, Onion, Sweet Potato, Mushroom, and Butter bean_ stir fry with _Almonds, Sunflower seeds, Hazelnuts, Sweetcorn, Chickpeas, Tuna, and Tomatoes_ on top. 🤷
|
||||||
|
|
||||||
I kept going. For science.
|
I kept going. For science.
|
||||||
|
|
||||||
|
|
2
layouts/shortcodes/details.gmi
Normal file
2
layouts/shortcodes/details.gmi
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{{ (.Get 0) | markdownify }}
|
||||||
|
{{ trim (partial "markdown.gmi" .Inner) "\n\r" -}}
|
Loading…
Reference in a new issue