GPT Time Poems

In my office I have a Raspberry Pi running a DAKboard dashboard. It shows the time, the temperature, and my calendar.

Inspired by this Twitter thread, my dashboard now also shows a poem!

I’m using the GPT-3.5 model via the OpenAI API to create a short poem about the current time. It shows on my dashboard to brighten my day.

In visions of the evening tide,
The world takes on a softer side,
As light begins to fade away,
And 4:19 bring the end of day.

ChatGPT 3.5 in the style of William Blake

In the garden at half past four
A sparrow chirps, then flies once more.
The roses bloom, a symphony red,
As the sun begins to dip its head.

ChatGPT 3.5 in the style of William Blake

The sun sets at 5:49,
A time to end and to unwind.
The day is done and so are we,
Until tomorrow, we’ll be free.

ChatGPT 3.5 in the style of William Blake

At five to five the sun still sleeps
The world outside is dark and deep
The moon shines bright, a silver light
As stars twinkle in the night.

ChatGPT 3.5 in the style of William Blake

It looks something like this:

Ignore the mismatched times – I took this screenshot while overseas, so one time shows local and one time shows the time in my office. The background is a selection from my favourites album, in Apple Photos.

How did I make this?

I’m using this prompt to generate the poem:

It’s ${currentTime}. Write a 4 line rhyming poem in the style of William Blake. The poem can be about anything except the passing of time, and it MUST include the current time in the format HH:MM.

If you’d like to do something similar, you can view the code for it in this GitHub gist. It’s pretty straightforward to copy / paste that into a DAKboard HTML widget – you’ll just need to update the paragraph’s style tag to suit your dashboard.

How much does something like this cost to run?

  • Each prompt / response requires about 100 tokens.
  • We run the request every minute of the day – 1,440 times.
  • That’s 144,000 tokens a day.
  • The Chat gpt-3.5-turbo model costs $0.002 / 1K tokens.
  • That makes $2.88 per day, around $85 / month.

Careful prompt design would allow you to half this. For example, you could go with a two line poem instead:

It’s ${currentTime}. Write a 2 line rhyming poem that includes the current time.


Posted

in

, ,