| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
content |
string | 选填 | - | 文档正文,与 file 二选一,≤1,000,000 tokens |
file |
string | 选填 | - | 文档,公网URL / Base64(data:开头) / 文件ID(fileid_开头),与 content 二选一 |
question |
string | 必填 | - | 问题,如「本合同违约责任如何约定」「总结第三章要点」 |
mode |
string | 选填 | qa |
任务类型:qa(默认)/ summary / outline / extract |
fields |
array | 选填 | - | mode=extract 时的抽取字段数组,如 ["甲方","金额","签署日期"] |
history |
array | 选填 | - | 多轮上下文,每项含 role(user/assistant) 与 content,默认空为单轮 |
language |
string | 选填 | auto |
回答语言:auto(默认)/ zh / en |
| 字段名 | 类型 | 说明 |
|---|---|---|
code | int | 状态码,0=成功 |
desc | string | 状态描述 |
data− |
object | 业务数据(成功时返回) |
answer |
string | 回答正文(mode=qa/summary/outline 时返回) |
extracted |
object | 抽取结果(mode=extract 时返回),key 来自 fields |
sections− |
array | 引用的原文段落 |
heading |
string | 所属章节或小标题(可为空) |
quote |
string | 原文片段 |
tokens_in |
int | 输入 Token 数 |
tokens_out |
int | 输出 Token 数 |
finish_reason |
string | 结束原因:stop / length |
request_id | string | 请求追踪ID |
{
"code": 0,
"desc": "success",
"data": { ... },
"request_id": "abc123..."
}
{
"code": 999,
"desc": "错误描述",
"request_id": "abc123..."
}
© 网程科技(林州网程科技有限公司) | 豫ICP备2025120409号-2 | 豫B2-20230220 | 豫公网安备 41058102000262号