ingest_items
Batch import questions with images, knowledge points, and tags. Automatically upload images to OSS, handle deduplication, and optionally create a paper. Returns batch ID for later retrieval.
Instructions
🔴 统一入库口(七类来源殊途同归):一次调用完成 题+图+知识点关系+打标字段+可选成卷,无需事后手补。
每题依次:图代传 OSS(local_path→ossUrl 并替换题面占位)→ blockJson 格式化 → 录题落库 (kp_id 走 knowledgeIds → 底座自动写 biz_question_knowledge + dim1_kp_id)→ 打标字段 (err/scenario/free_tags → biz_question_ai;why → difficulty_reason;models/new_models → 模型链,批尾串行)。 参数: items: IngestItem[](契约见 get_role_manual;未知字段拒绝,缺 stem 单条 fail 不中断批) subject_root: KG 教材根(数学七上="100";科学="901".."906")——无 kp_id 的题 subject_id 落此根 paper: 可选建卷 {name, category_id, total_score, suggest_time};null=散题不成卷 前置信息原样落库不被覆盖(AC3);同题干重复录入自动去重复用(AC4)。 🔴 双管道来源标记(PRD-O-005 溯源增强):本调用自动生成一个批次号,每题打 import_source="mcp-<角色>"(MCP 机录)+ import_batch_id=该批次号。录完记住返回的 batch_id, 日后 search_questions(batch_id=…) 或 my_recent_uploads() 一键找回。 不带 "mcp-" 前缀的 import_source(main/手工导入/'举一反三'引擎…)= 其他/手工管道。 返回: {ok, batch_id, results:[{num, question_id, created, reason?, warnings?}], paper_id?, stats:{ok,reused,fail,img}, view_url?}。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| paper | No | ||
| subject_root | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||