Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would just make it respond ONLY in JSON and if it's non-compliant formatting then don't use it. I doubt it'd apologize in JSON format. A quick test just now seems to work



If you're using the API's JSON mode, it will apologize in JSON. If you prompt asking for JSON not in that mode, it should work like you're thinking.


I would use function calling instead to return a boolean and throw away anything that isn't a bool.


Ask the API to return escaped JSON or any other specific format. An apology or refusal won't be encoded.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: