文本改进
POST
https://api.ai21.com/studio/v1/improvements _请求参数
Body 参数application/json
types
array [object {5}]
必需
通过从以下选项中进行选择,选择要对文本应用哪些改进: 流利 词汇/特异性 词汇/多样性 清晰度/短句 清晰度/简洁性。 默认情况下,此 API 参考页面上包含所有类型。您可以通过单击删除按钮排除一种或多种类型
fluency
string
可选
vocabulary/specificity
string
可选
vocabulary/variety
string
可选
clarity/short-sentences
string
可选
clarity/conciseness
string
可选
text
string
必需
输入文字有待改进。 文本长度不应超过 500 个字符。
示例
{
"types": [
"fluency",
"vocabulary/specificity",
"vocabulary/variety",
"clarity/short-sentences",
"clarity/conciseness"
]
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
必需
improvements
array [object {5}]
必需
suggestions
array[string]
可选
startIndex
integer
可选
endIndex
integer
可选
originalText
string
可选
improvementType
string
可选
示例
{
"id": "5e04fb46-bb0a-2cce-52e9-8e548562d5db",
"improvements": [
{
"suggestions": [
"As a project manager, I have acquired",
"Through my affiliation with the project management profession, I have acquired",
"Project management has equipped me with"
],
"startIndex": 0,
"endIndex": 84,
"originalText": "Affiliated with the profession of project management, I have ameliorated myself with",
"improvementType": "fluency"
}
]
}
最后修改时间: 1 年前