convert_lecture_docx
Convert lecture docx files into Tiptap content with knowledge graph targets, sections, and image placeholders for understanding mapping. Supports assist and auto modes.
Instructions
讲义 docx → 忠实 Tiptap 内容 + KG 知识点靶子 + 图清单(确定性,零 login,零落库)。理解式映射的原料台。
🔴 崔崔版式实测=模块(H3)>分组(H3)>知识点(H4),纯确定性 H3 切片对不上 KG 知识点 → 默认 mode='assist': 工具只做忠实转换 + 按顶层 H3 分段 + 给出该课时 KG 知识点靶子,切成知识点由 agent 理解式映射 (读 raw_path 全文,按 kg_targets 重组讲解成片段 IR,习题模块的题走 ingest_items 拿 qid 后挂 kgExample)。 mode='auto':仅当来源 H3 已== KG 知识点名(已清洗源)才用——跑确定性 split_frags + 对齐闸,直接产 IR。 🔴 图不在此上传:content 里 image.src=〖图:rId〗占位 + rid;images[].local_path 喂 upload_image 拿 ossUrl, save_lecture_frag(image_map={rid:ossUrl}) 回填。忠实转换细节:heading/paragraph 留 bold/italic/color、 表 w:shd→背景色、单元格内图、图 EMU→px 内容区 clamp、EMF/WMF 矢量图无 local_path(浏览器不支持)。 参数: docx_path : 讲义 docx 绝对路径 course_subject_id : 课时 L4 subject_id(如 901001002001)——KG 知识点靶子来源 book_id : 教辅套 id(崔崔=CC7S) batch : 产物落盘名前缀(空=docx 文件名主干) mode : 'assist'(默认,理解式原料) | 'auto'(确定性 H3 切片,仅清洗源可用) | 'cuicui'(崔崔适配器) 返回(assist): {ok, mode, course, kg_targets:[{id,name}], sections:[{h3,node_count,preview,start,end}], images:[{rid,local_path}], raw_path, stats, deterministic_hint:{toc,unmatched_h3,frags}} ← 后者是 H3 切片试探,崔崔版必 FAIL 仅供参考。 返回(auto): {ok, mode, course, frag_count, frags, toc, unmatched_h3, images, ir_path, stats}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | assist | |
| batch | No | ||
| book_id | No | CC7S | |
| docx_path | Yes | ||
| course_subject_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||