extract_workflow.schema.json 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "extract_workflow_output_v5",
  4. "type": "object",
  5. "required": ["skip", "skip_reason", "strategy"],
  6. "properties": {
  7. "skip": {
  8. "type": "boolean"
  9. },
  10. "skip_reason": {
  11. "type": "string"
  12. },
  13. "strategy": {
  14. "anyOf": [
  15. {
  16. "type": "null"
  17. },
  18. {
  19. "type": "object",
  20. "required": ["steps", "effects", "criterion", "unstructured_what"],
  21. "properties": {
  22. "steps": {
  23. "type": "array",
  24. "minItems": 1,
  25. "items": {
  26. "type": "object",
  27. "required": [
  28. "order",
  29. "phase",
  30. "action",
  31. "body",
  32. "inputs",
  33. "outputs",
  34. "tools",
  35. "apply_to_draft"
  36. ],
  37. "properties": {
  38. "order": {
  39. "type": "integer",
  40. "minimum": 1
  41. },
  42. "phase": {
  43. "type": "string",
  44. "enum": ["预处理", "生成", "编辑"]
  45. },
  46. "action": {
  47. "type": "object",
  48. "required": ["main_action", "mechanism"],
  49. "properties": {
  50. "main_action": {
  51. "type": "string",
  52. "minLength": 1,
  53. "description": "主动作:生成、编辑、提取、改写、合成、修复、增强、训练、评估、剪辑、模板化、排版、转写、配音、匹配、扩展、导出"
  54. },
  55. "mechanism": {
  56. "type": "string",
  57. "minLength": 1,
  58. "description": "动作方式:直接生成、一致性保持、结构约束、质量收束、局部重绘、扩图、换背景等"
  59. }
  60. }
  61. },
  62. "body": {
  63. "type": ["string", "null"]
  64. },
  65. "inputs": {
  66. "type": "array",
  67. "items": {
  68. "type": "object",
  69. "required": ["modality", "description"],
  70. "properties": {
  71. "modality": {
  72. "type": "string",
  73. "minLength": 1,
  74. "description": "模态:文本、图片、视频、音频、特征点、参数、模型、向量、表格"
  75. },
  76. "description": {
  77. "type": "string",
  78. "minLength": 1,
  79. "description": "功能性描述,不写具体内容what"
  80. }
  81. }
  82. }
  83. },
  84. "outputs": {
  85. "type": "array",
  86. "items": {
  87. "type": "object",
  88. "required": ["modality", "description"],
  89. "properties": {
  90. "modality": {
  91. "type": "string",
  92. "minLength": 1
  93. },
  94. "description": {
  95. "type": "string",
  96. "minLength": 1
  97. }
  98. }
  99. }
  100. },
  101. "tools": {
  102. "type": "array",
  103. "items": {
  104. "type": "string"
  105. }
  106. },
  107. "apply_to_draft": {
  108. "type": "object",
  109. "required": ["实质", "形式"],
  110. "properties": {
  111. "实质": {
  112. "type": "array",
  113. "items": {
  114. "type": "string"
  115. }
  116. },
  117. "形式": {
  118. "type": "array",
  119. "items": {
  120. "type": "string"
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. },
  128. "effects": {
  129. "type": "array",
  130. "items": {
  131. "type": "string",
  132. "pattern": "^实现"
  133. }
  134. },
  135. "criterion": {
  136. "type": ["string", "null"]
  137. },
  138. "unstructured_what": {
  139. "type": "array",
  140. "items": {
  141. "type": "string"
  142. }
  143. }
  144. }
  145. }
  146. ]
  147. }
  148. }
  149. }