官方接口文档:https://platform.openai.com/docs/api-reference/completions文章来源:https://www.toymoban.com/news/detail-430667.html
给定一个提示,该模型将返回一个或多个预测的响应结果文章来源地址https://www.toymoban.com/news/detail-430667.html
- 请求示例
POST https://api.openai.com/v1/completions
Content-Type: application/json;charset=UTF-8
Authorization: Bearer sk-******
{
"model": "text-davinci-003",
"prompt": "讲个笑话",
"suffix": "[CreatBy DIY]",
"max_tokens": 256,
"temperature": 0.9,
"n": 2,
"user": "DIY"
}
- 响应示例
{
"id": "cmpl-6hrMxYv8JLgIM7uQIPCAdXzm5A9Ps",
"object": "text_completion",
"created": 1675911275,
"model":
到了这里,关于ChatGPT之Completions(问答诗人)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!