{
"templateId": "xxx", // 模板ID(非必填)
"outlineMarkdown": "# 主题\n## 章节\n### 页面标题\n#### 内容标题", // 大纲 markdown 文本
"asyncGenPptx": true, // 异步生成PPT(这里必须为 true 才会流式生成)
"prompt": null, // 用户要求
"dataUrl": null // 数据url,调用解析文件内容接口返回
}
curl --location --request POST 'https://api.leebay.cyou/docmee/v1/api/ppt/generateContent' \
--header 'Authorization: sk-xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"templateId": "xxx", // 模板ID(非必填)
"outlineMarkdown": "# 主题\n## 章节\n### 页面标题\n#### 内容标题", // 大纲 markdown 文本
"asyncGenPptx": true, // 异步生成PPT(这里必须为 true 才会流式生成)
"prompt": null, // 用户要求
"dataUrl": null // 数据url,调用解析文件内容接口返回
}'
{
"text": "",
"status": 3, // 状态:-1异常 0模型重置 1解析文件 2搜索网页 3生成中 4完成
// 下面为异步生成PPT时返回的数据,可以每出现一次就调用 asyncPptInfo 接口获取最新的PPT数据
"pptId": "xxx", // 异步生成pptId
"total": 23, // 总页数
"current": 1 // 当前已生成页数
}
{ "text": "#", "status": 3 }
{ "text": " ", "status": 3 }
{ "text": "主题", "status": 3 }
...
{
"text": "",
"status": 4,
"result": {
"level": 1,
"name": "主题",
"children": [
{
"level": 2,
"name": "章节",
"children": [
{
"level": 3,
"name": "页面标题",
"children": [
{
"level": 4,
"name": "内容标题",
"children": [
{
"level": 0,
"name": "内容"
}
]
}
]
}
]
}
]
}
}