I got this chat result:
{
"id" : "chatcmpl-AAgIt6YKiKLdKWewL2qwDRk7923Ti",
"model" : "gpt-4-turbo-2024-04-09",
"object" : "chat.completion",
"system_fingerprint" : "fp_22b855c4b7",
"choices" : [
{
"message" : {
"content" : "\n {\n \"message\": \"An enrollment SMS code has been sent. Please provide the code to complete the enrollment process.\"\n }\n{\n \"message\": \"An enrollment SMS code has been sent to Heather. Please provide the code to complete the enrollment process.\"\n}",
"role" : "assistant"
},
"finish_reason" : "stop",
"index" : 0
}
],
"created" : 1727109259,
"usage" : {
"total_tokens" : 8464,
"completion_tokens" : 57,
"prompt_tokens" : 8407
}
}
The content field contained a malformed JSON result, it duplicated the message, which is not valid JSON, since the Swift OpenAI decoder expected one valid JSON object here. Usually it works, but sometimes I get this garbage result.