Hi everyone,
It seems I have a common problem, but I can’t find the solution. The JSON response from OpenAI is below.
I would like to create a workflow that takes the text in “choices:message:content” and have each of the “Feature 1” , “Feature 2”, etc be placed in individual rows. As of now, I can only create a workflow that adds the entire content of the response in 1 row.
Is there a way to parse the response so that:
- The content is split into multiple rows and
- Updates the rows every time new responses come in
Thank you!
{
"id": "chatcmpl-7pQvQm9FFWn75T9ioGHRQkgLxE4sX",
"object": "chat.completion",
"created": 1692492584,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Feature 1: Automated Appliance Scheduling\nBenefit: Allow homeowners to schedule the usage of their appliances during the peak electricity usage hours (3-8pm on weekdays) to ensure efficient use of energy and minimize consumption.\n\nFeature 2: Energy-Saving Tips and Recommendations\nBenefit: Offer homeowners tailored energy-saving tips and recommendations during the peak hours to help them reduce electricity usage. These suggestions can include adjusting thermostat settings, optimizing lighting, and using energy-efficient appliances."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 225,
"completion_tokens": 96,
"total_tokens": 321
}
}