Hacker News new | ask | show | jobs
by rytill 1101 days ago
Did you try using the API and providing a very clear system message followed by several examples that were pure JSON?
1 comments

Yep. I even gave it a JSON schema file to use. It just wouldn't stop added extra verbage.
I just use a regex to select everything between the first and last curly bracket, reliable fixes the “sure, here’s your object” problem.
Say it's a json API and may only reply with valid json without explanation.
Lol yes of course I tried that.
I've had good luck with both:

https://github.com/drorm/gish/blob/main/tasks/coding.txt

and

https://github.com/drorm/gish/blob/main/tasks/webapp.txt

With the second one, I reliably generated half a dozen apps with one command.

Not to say that it won't fail sometimes.

Combine both ? :)