$ pip install openai

 

python+chatgpt api
https://www.zhihu.com/question/587083296/answer/2918637801
API keys
https://platform.openai.com/account/api-keys
API reference
https://platform.openai.com/docs/api-reference/introduction?lang=python

https://github.com/openai/openai-python

 

curl https://api.openai.com/v1/models -H “Authorization: Bearer sk-xxxx”
{
“models”: [
{
“id”: “davinci-v3-gpt2”,
“name”: “Davinci v3 (GPT-2)”,
“description”: “GPT-2, small version (124M parameters)”,
“default_branch”: “master”,
“builds”: [
{
“id”: “davinci-v3-gpt2-master-v4”,
“commit”: “adf2f8bbf3faa7f40000000000000cf28b7c9”,
“created”: “2020-04-24T19:45:49.419Z”,
“status”: “ready”,
“model_size”: “124000000”
}
]
}
],
“count”: 1
}

作者 admin

百度广告效果展示