extract_workflow.schema.json 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "extract_workflow_output_v5",
  4. "type": "object",
  5. "required": [
  6. "skip",
  7. "skip_reason",
  8. "strategy"
  9. ],
  10. "properties": {
  11. "skip": {
  12. "type": "boolean"
  13. },
  14. "skip_reason": {
  15. "type": "string"
  16. },
  17. "strategy": {
  18. "anyOf": [
  19. {
  20. "type": "null"
  21. },
  22. {
  23. "type": "object",
  24. "required": [
  25. "steps",
  26. "effects",
  27. "criterion",
  28. "unstructured_what"
  29. ],
  30. "properties": {
  31. "steps": {
  32. "type": "array",
  33. "minItems": 1,
  34. "items": {
  35. "type": "object",
  36. "required": [
  37. "order",
  38. "phase",
  39. "action",
  40. "body",
  41. "inputs",
  42. "outputs",
  43. "tools",
  44. "apply_to_draft"
  45. ],
  46. "properties": {
  47. "order": {
  48. "type": "integer",
  49. "minimum": 1
  50. },
  51. "phase": {
  52. "type": "string",
  53. "enum": [
  54. "非制作",
  55. "预处理",
  56. "生成",
  57. "编辑"
  58. ]
  59. },
  60. "action": {
  61. "type": "object",
  62. "required": [
  63. "main_action",
  64. "mechanism"
  65. ],
  66. "properties": {
  67. "main_action": {
  68. "type": "string",
  69. "minLength": 1,
  70. "description": "主动作:生成、编辑、提取、组织、筛选"
  71. },
  72. "mechanism": {
  73. "type": "string",
  74. "minLength": 1,
  75. "description": "动作方式:直接生成、局部重绘、提示词反推、分类入库、抽卡选优等"
  76. }
  77. }
  78. },
  79. "body": {
  80. "type": [
  81. "string",
  82. "null"
  83. ]
  84. },
  85. "inputs": {
  86. "type": "array",
  87. "items": {
  88. "type": "object",
  89. "required": [
  90. "modality",
  91. "description",
  92. "relation"
  93. ],
  94. "properties": {
  95. "modality": {
  96. "type": "string",
  97. "minLength": 1,
  98. "description": "模态:文本、图片、视频、音频、特征点、参数、模型、向量、表格"
  99. },
  100. "description": {
  101. "type": "string",
  102. "minLength": 1,
  103. "description": "功能性描述,不写具体内容what"
  104. },
  105. "relation": {
  106. "type": "string",
  107. "minLength": 1,
  108. "description": "来源与去向,有特定格式"
  109. }
  110. }
  111. }
  112. },
  113. "outputs": {
  114. "type": "array",
  115. "items": {
  116. "type": "object",
  117. "required": [
  118. "modality",
  119. "description",
  120. "relation"
  121. ],
  122. "properties": {
  123. "modality": {
  124. "type": "string",
  125. "minLength": 1
  126. },
  127. "description": {
  128. "type": "string",
  129. "minLength": 1
  130. },
  131. "relation": {
  132. "type": "string",
  133. "minLength": 1,
  134. "description": "来源与去向,有特定格式"
  135. }
  136. }
  137. }
  138. },
  139. "tools": {
  140. "type": "array",
  141. "items": {
  142. "type": "string"
  143. }
  144. },
  145. "apply_to_draft": {
  146. "type": "object",
  147. "required": [
  148. "实质",
  149. "形式"
  150. ],
  151. "properties": {
  152. "实质": {
  153. "type": "array",
  154. "items": {
  155. "type": "string"
  156. }
  157. },
  158. "形式": {
  159. "type": "array",
  160. "items": {
  161. "type": "string"
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. },
  169. "effects": {
  170. "type": "array",
  171. "items": {
  172. "type": "object",
  173. "required": [
  174. "statement",
  175. "criteria",
  176. "judge_method",
  177. "negative_examples"
  178. ],
  179. "properties": {
  180. "statement": {
  181. "type": "string",
  182. "pattern": "^实现"
  183. },
  184. "criteria": {
  185. "type": "string",
  186. "minLength": 1
  187. },
  188. "judge_method": {
  189. "type": "string",
  190. "enum": [
  191. "llm",
  192. "vlm",
  193. "rule",
  194. "human"
  195. ]
  196. },
  197. "negative_examples": {
  198. "type": "array",
  199. "items": {
  200. "type": "string",
  201. "minLength": 1
  202. },
  203. "default": []
  204. }
  205. }
  206. }
  207. },
  208. "criterion": {
  209. "type": [
  210. "string",
  211. "null"
  212. ]
  213. },
  214. "unstructured_what": {
  215. "type": "array",
  216. "items": {
  217. "type": "string"
  218. }
  219. }
  220. }
  221. }
  222. ]
  223. }
  224. }
  225. }