News for hackers. Stuff that matters.
Re:GPT-JSON: Structured and typehinted GPT responses in Python by pigcat on Friday May 05, 2023 @01:03PM (#35832127)
Since others are sharing their prompt-only solutions to get JSON, I'll share what I've been using. Has been working reliably:

"Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation.

{

  "author": "string describing the author full name",

  "year": "number describing the year the book was written",

  "isFiction": "boolean describing if the book is a work of fiction"

  ...
} "

There are no comments on this comment yet.