render_shuzimi_figure
Renders PNG images of vertical arithmetic puzzles (e.g., 6?37+3??=7183) where '?' marks a box. Supports multiple puzzles and direct OSS upload for embedding in questions.
Instructions
数字谜竖式图生成器:按结构化 puzzles 确定性画竖式 PNG('?'=待填□方框),可直传 OSS。
🔴 结构规范:puzzles=1~4 个竖式横向并排,每个 {label?, rows:[{op,cells}...]}; cells 一字符一格(数字/汉字均可),'?'=□;op=+ - × ÷ 或空;op="HR"=横线行。 例(6□37+3□□=7183):rows=[{"op":"","cells":"6?37"},{"op":"+","cells":"3??"}, {"op":"HR"},{"op":"","cells":"7183"}]。 参数: upload=True 则直传 OSS(需先 login),False 只落本地;out_name 自定义文件名(可空)。 返回: {ok, local_path, width, height, oss_url?, asset_id?}。 产物用法: oss_url 塞 blockJson 图块(biz_question_block)或 ingest_question.images; 答案版把 '?' 换成实际字符再调一次。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upload | No | ||
| puzzles | Yes | ||
| out_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||