News for hackers. Stuff that matters.
Re:GPT-JSON: Structured and typehinted GPT responses in Python by zh217 on Friday May 05, 2023 @12:31PM (#35831626)
Thanks. Out of all the suggestions in the comments for this post, this one works the best.

And in fact it is only one line, not 40:

    "Please respond ONLY with valid json that conforms to this pydantic json_schema: {model_class.schema_json()}. Do not include additional text other than the object json as we will load this object with json.loads() and pydantic."
Re:GPT-JSON: Structured and typehinted GPT responses in Python by wskish on Friday May 05, 2023 @11:47PM (#35837786)
yes thats actually it