Gracias por el script para verificar la funcionalidad de la API de OpenAI.
Iniciamos el script en nuestro servidor y obtuvimos la siguiente respuesta de gpt:
...
{
"index": 0,
"message": {
"role": "assistant",
"content": "In the heart of the coded rhyme,\nBehold, there’s a concept sublime.\nIt's recursion, an art, an ancient tradition,\nOf a function calling itself, that's the mission.\n\nA function so proud, will not heed the call,\nOf any other, it stands tall.\nIt opts to invoke itself anew,\nThus, weaving patterns that intrigue view.\n\nWhen it starts, you might suppose,\nWhere it ends, no one knows?\nBut fear, not the infinite loop,\nFor base case is our saving hoop.\n\nUpon reaching the base so divinely small,\nThe function at last does forestall.\nSo, it stops and does not bind,\nReturning what it's meant to find.\n\nWho would make such hearty appeal?\nAn elegant way to seal the deal.\nSolving mazes, or reversing strings,\nSee recursion spreading its wings.\n\nEach instance has its memory stack,\nTo trace its way, front to back.\nAnd as these instances grow,\nA tower of memory, they bestow.\n\nWhen done right, the harmony is pure,\nRecursion’s charm, quite the lure.\nIt’s elegance, it’s profound autonomy,\nA jewel in the crown of algorithms' ceremony.\n\nIt's a dance, it's a play, eternal reprise,\nIn the theater of codes, where recursion lies.\nBehold the beauty, behold the excursion,\nIn the vast realm of code, that's the recursion."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 39,
"completion_tokens": 282,
"total_tokens": 321
},
"system_fingerprint": null
}
Esta llamada parece funcionar. Pero cuando activo las funciones de IA de Discourse (por ejemplo, “asistente de IA del compositor”) utilizando la misma clave de API de OpenAI, obtengo una respuesta nula o el mensaje de error que se muestra en la primera publicación de este hilo.
¿Existen otras posibilidades para depurar las llamadas a la API de OpenAI?