感谢您提供用于检查 OpenAI API 功能的脚本。
我们在服务器上运行了该脚本,并从 gpt 得到了以下答案:
...
{
"index": 0,
"message": {
"role": "assistant",
"content": "In the heart of the coded rhyme,
Behold, there’s a concept sublime.
It's recursion, an art, an ancient tradition,
Of a function calling itself, that's the mission.
A function so proud, will not heed the call,
Of any other, it stands tall.
It opts to invoke itself anew,
Thus, weaving patterns that intrigue view.
When it starts, you might suppose,
Where it ends, no one knows?
But fear, not the infinite loop,
For base case is our saving hoop.
Upon reaching the base so divinely small,
The function at last does forestall.
So, it stops and does not bind,
Returning what it's meant to find.
Who would make such hearty appeal?
An elegant way to seal the deal.
Solving mazes, or reversing strings,
See recursion spreading its wings.
Each instance has its memory stack,
To trace its way, front to back.
And as these instances grow,
A tower of memory, they bestow.
When done right, the harmony is pure,
Recursion’s charm, quite the lure.
It’s elegance, it’s profound autonomy,
A jewel in the crown of algorithms' ceremony.
It's a dance, it's a play, eternal reprise,
In the theater of codes, where recursion lies.
Behold the beauty, behold the excursion,
In 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
}
此调用似乎有效。但是,当我激活 Discourse AI 功能(例如“composer ai helper”)并使用相同的 OpenAI API 密钥时,要么没有响应,要么出现此线程第一个帖子中显示的错误消息。
是否有其他方法可以调试 OpenAI API 调用?