|
|
|
|
|
by tensorflowz
1153 days ago
|
|
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. |
|
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.