Hacker Newsnew | past | comments | ask | show | jobs | submit | tensorflowz's commentslogin

Super cool! Being able to chain together multiple generative models seems like it will definitely be able to help people who normally aren't the creative type to start getting creative. Or at least give them easy-to-use tools so more people can make more content :)


Not sure what my plan will be there - I think the way I define the JSON and validate it could be worthwhile so I may either try and extract it out to some package I can publish or possibly have it as an endpoint for people to consume.

Is this the part you think would be most interesting to others or was there another part of the flow you were referencing?


Yes that do sounds useful though you are right it depends on the implementation .


Yes, I get back only JSON. I found that providing a sample object is the best way to be consistent. I also have some basic validation on fields and have follow-up calls if needed. For example, dialog must be 1 character and at max 255. If I see empty dialog or too long dialog (or any other invalid fields), I pass back the JSON to GPT as well as the basic list of 'this property is wrong due to X' and make it provide a new JSON object.


GPT4 is much better than GPT3.5 at producing valid JSON and nothing else.

What I’ve found quite useful is to extract text from the first { and last }. This solves the problem of GPT adding some “helpful” explanations outside the JSON.


I really wanted to use GPT-4 but still just waiting in line :( I should add in your tip, would save me a retry call every now and then I’m sure.


There are also some more lenient JSON parsers that will handle comments and other non-standard things. They can be a bit hard to add in to some frameworks as it’s kind of the opposite of what you are normally trying to do which is reject bad input.


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

Search: