文本编辑 /v1/edits
POST
/v1/edits请求参数
Body 参数application/json
No schema defined
示例
{
"model": "text-davinci-edit-001",
"input": "What day of the wek is it?",
"instruction": "Fix the spelling mistakes"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
object
string
必需
created
integer
必需
创建时间,10位时间戳
choices
array [object {2}]
必需
text
string
修改后的文本
index
integer
数组索引
usage
object
消耗
prompt_tokens
integer
输入 tokens
completion_tokens
integer
响应 tokens
total_tokens
integer
必需
总消耗 tokens
示例
{
"object": "edit",
"created": 1589478378,
"choices": [
{
"text": "What day of the week is it?",
"index": 0,
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 32,
"total_tokens": 57
}
}
最后修改时间: 1 年前