How To: Commercially Account for OpenAI API Calls

We've devised a way to account for every API Call made to OpenAI in our App. I thought someone might find this useful:

We added a backend workflow that runs after every AI response and records the usage returned by the API: model, input tokens, output tokens and total tokens.

The workflow identifies the model used, applies that model’s current input and output pricing, and calculates the actual commercial cost of the call. Each transaction is then stored against the user, feature and timestamp, giving us a complete record of token consumption and AI cost across the platform.

This means we can report usage by user, feature, model or date range, rather than relying on estimates from monthly invoices.

If anyone wants to know the details of how this was actually done, just DM me.

reddit.com
u/Adam_Gill_1965 — 20 days ago

A novel that might ring a few bells with those who served in the early ’80s

Posted with the Mods’ permission.

I recently published a novel called A&E and thought I would mention it here, as some of you who served in the early 1980s might get something from it. It is not a memoir, and it is not really a military novel in the usual sense. It is a thriller set in the present day, but the story has its roots in a secret military research programme dating back more than forty years.

A former soldier ends up caught in the middle of it, alongside a microbiologist and the daughter of the scientist responsible for the original work. What starts with an incident in a hospital quickly turns into something much bigger.

A lot of the military background, attitudes and humour came naturally from my own time in the Army. Anyone who served around that period may recognise some of the language, the characters and the way people dealt with things - even though the story itself is entirely fictional.

I am not here to give it the hard sell. I just thought it might appeal to a few people here who remember that era.

The ebook is available on Lulu: https://www.lulu.com/shop/adam-gill/ae/ebook/product-p64y8vm.html?page=1&pageSize=4

u/Adam_Gill_1965 — 22 days ago

Is Amazon Lulu the right place to self publish?

I mean - I've already done it and it looks like the distribution will go out to Amazon, Barnes & Nobel, Apple Books, Kindle, Kobo and various other channels.

Was it the right decision or should I (also) self-publish elsewhere?

Thanks!

reddit.com
u/Adam_Gill_1965 — 1 month ago

Thinking about creating an App to produce Bubble App full TDD, ERD's, User Journeys and UAT Plans....

I know how difficult it can be to document a build after so many iterations and changes - and the majority of low code developers are "doing it for themselves". But.... would anybody be interested in an App that does that documentation for you?

I am aware that buildprint offers various services - I was thinking of a standalone, do-it-yourself App. Built on Bubble, of course!

reddit.com
u/Adam_Gill_1965 — 1 month ago

The Watcher

There's a person that you can't fool at all,

They know all your secrets and they never come to call,

When you're down and out or reaching for the highest peak,

They never complain nor mither — and they never, ever speak.

They see the little victories you quietly conceal,

The doubts beneath the confidence, the wounds you never feel,

They watch you make your choices, every promise that you keep,

And hold the words you swallow when the house has gone to sleep.

They know the roads you wandered and the ones you should have taken,

The dreams you left behind you and the hearts you may have shaken,

They follow every footprint, though they never make a sound,

And stand beside you faithfully wherever you are found.

And one day in the mirror, when you finally look inside,

You see the one who knows you, with no place at all to hide,

The person who has watched you through each joy and every view,

Was never someone else at all — it has always been you.

reddit.com
u/Adam_Gill_1965 — 2 months ago

I Before E Except After C - Yaz/Yazoo - Electro Pop (1982)

Lyrics

There would stop because
There will always be, because
There will always be, for two
There will always

Inside you can feel th-
Outside you can see the difference
Inside, stop, inside, difference
Outside, out stop, inside you can feel the difference

Feel the
You can difference, difference, difference
You can see the, feel the difference
You can stop, stop, and see the, you can stop, you can see the difference

Dragons, the policman knew,
Were supposed to breathe, to breath fire, fire, to breathe fire
And occasionally get themseleves, get themseleves
Slaughtered, slaughtered, slaughtered

He decided.
That would definitely not be decided
Stop, stop
Definitely not

Stop, stop
Not
Definitely
That would that would that would

Stop
Definitely decided
Decided decided decided
Not not
He decided [Repeat]

youtube.com
u/Adam_Gill_1965 — 2 months ago

What We Know In The End

Do you recall what happened to your great grandparents, that time down by the creek?
Remember when your great-great uncle was ostracised for being gay - a freak?
Or when they rationed sugar and your great grandfather craved for years?
No - you don't know - nor could you - not what brought joy nor tears.

What we know in the end is just a snippet of everything that has been and gone,
Anecdotes, misheard quotes, rumours and events as we moved on,
Why then, do we concern ourselves today with what will be our legacy?
When you don't have recollections of what happened - even more recently.

Live for the moment, enjoy each second and rejoice that you are here,
For years down the line, your legacy won't be at all clear,
Nobody will be there to whisper how you lost or found your way,
So be bold, be proud - and live your life every day.

reddit.com
u/Adam_Gill_1965 — 2 months ago

How for Force Server Logs to Populate

I am getting tired of Bubble *not* displaying Server Logs in a timely fashion. Is there a trick to forcing the display of logs within, say, the last 3 minutes?

reddit.com
u/Adam_Gill_1965 — 2 months ago

Top Tip: Bubble Export Application (JSON) Feature for TDD's

I don't know how long the "Export application" Feature has existed in the General Tab - but I have recently discovered it. I am not sure if anyone else using it as the core JSON for producing Architecture or Technical Design Documents using ChatGPT, etc but I have just discovered that it works a treat! You can create ERD's with the export, too...

reddit.com
u/Adam_Gill_1965 — 2 months ago
▲ 152 r/CasualUK

Favourite UK Internal Business Quote?

On an internal Zoom call at work reviewing a customer request, I just heard "Yeah but they want the moon on a stick for the price of an ice lolly". I'm pretty sure he worked on that before saying it.

What's your favourite?

reddit.com
u/Adam_Gill_1965 — 2 months ago

In The Air Tonight - Lyrics Interpretation

It has been 44 years since it was released and it still hits me every time. Phil has tried to convince interviewers that he is not really sure what the lyrics were about, except to say that he was going through a bad divorce at the time. Personally, it resonates with me because I believe I have interpreted the lyrics and captured the sentiments pretty accurately:

In the beginning - this is a pre-cursor to a showdown with his estranged wife - thoughts in his own head:

I can feel it coming in the air tonight
Oh, Lord
And I've been waiting for this moment, for all my life
Oh, Lord
Can you feel it coming in the air tonight?
Oh, Lord
Oh, Lord

Then we hear how much he despises his wife or her lover:

Well, if you told me you were drowning
I would not lend a hand

Then - this is his thoughts about what he would say to her lover, whom he met several times - and clearly he had an idea of what was going on and was sick of them pretending they were just friends:

I've seen your face before my friend
But I don't know if you know who I am

Well, I was there and I saw what you did
I saw it with my own two eyes
So you can wipe off that grin
I know where you've been
It's all been a pack of lies

Then he recalls the first time he met him - and how that felt, knowing his suspicions were correct:

Well, I remember
I remember don't worry
How could I ever forget? It's the first time
The last time we ever met

And then, when he eventually asks the right questions, he is met with silence - not denials:

But I know the reason why you keep your silence up
No, you don't fool me
Well, the hurt doesn't show
But the pain still grows
It's no stranger to you or me

The remainder is the rising anger and frustrations finally spilling out. My interpretation is that he threw fits of rage by himself - things that he would have liked to have done, things he would have liked to have said - to have shouted - all still bottled up inside.

That's mine - what's your interpretation?

reddit.com
u/Adam_Gill_1965 — 2 months ago
▲ 1.9k r/doctorwho+1 crossposts

From a real person to a living statue! Watching the step-by-step process of turning the performer into an ancient temple sculpture, only for her to completely light up the stage with those flawless dance moves - unbelievable talent!

u/Adam_Gill_1965 — 3 months ago