I’ve tried everything. Please help. I need to get my OpenAI API call response parsed and separated into data fields. Here’s an example API response.
`json
{
“response”: {
“scores”: {
“quality”: {
“punctuation_grammar”: 4,
“clarity”: 4,
“coherence_structure”: 5
},
“informational_content”: {
“novelty”: 5,
“surprisal”: 4,
“analytical_depth”: 4,
“internal_breadth”: 5
},
“engagement_potential”: {
“interest_potential”: 5,
“emotional_resonance”: 4,
“interactivity”: 4,
“constructive_provocativeness”: 5
}
},
“summary”: {
“overall_score”: 4.5,
“feedback”: “Your Contribute displays a well-rounded perspective on the Los Angeles Rams’ history and impact, engaging readers effectively and encouraging thoughtful reflection on their identity and legacy.”
Should the response be formatted differently?
If the response formatting is fine, then how to get it from a custom state into my database fields? I have tried various plugins and various methods with numerous issues continually popping up. This can’t be rocket science! Surely it is a common workflow that is easy to solve. But I haven’t found the answer. Nothing but errors and roadblocks.
HELP!
Thank you.