咱们能够晓得chatGPT的公开接口为:申请接口:
URL:-POST https://api.openai.com/v1/com...
headers: { 'content-type': 'application/json', 'Authorization': 'Bearer ' +官网获取的api秘钥 }
data:{prompt: 问题内容, max_tokens: 2048, model: "text-davinci-003"} 

curl脚本测试 

curl 'https://api.openai.com/v1/completions' \-X POST \-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.70' \-H 'Content-Type: application/json' \-H 'Authorization: Bearer 官网密钥' \-d '{"prompt":"你是谁?","max_tokens":2048,"model":"text-davinci-003"}' \--compressed

其余各种语言的脚本能够自行依据下面的参数进行编写例如我golang语言的测试

演示网址:
https://gofly.v1kf.com/vue/in...