process.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. {
  2. "name": "GenerateNote",
  3. "description": "生成小红书图文笔记",
  4. "variables":
  5. {
  6. "article-prompt": "健康减脂:科学饮食与运动习惯,适合做小红书笔记",
  7. "article": "",
  8. "img-prompt-arr":
  9. [
  10. "健康减脂餐 轻食沙拉 低卡高蛋白 摆盘",
  11. "居家有氧运动 女生健身 燃脂操"
  12. ],
  13. "img-url-arr": [],
  14. "pos": ""
  15. },
  16. "execute": [
  17. {
  18. "type": "echo",
  19. "inVars": ["开始生成小红书图文笔记"]
  20. },
  21. {
  22. "type": "ai",
  23. "method": "text2text",
  24. "inVars": ["根据以下主题写一篇小红书风格的图文稿件,要求:长文,至少 500 字,分段清晰、吸引人、适当使用 emoji、适合发笔记。只输出稿件正文,不要标题。主题:{{article-prompt}}", ""],
  25. "outVars": ["{article}"]
  26. },
  27. {
  28. "type": "for",
  29. "indexVariable": "{idx}",
  30. "items": "{img-prompt-arr}",
  31. "body": [
  32. {
  33. "type": "echo",
  34. "inVars": ["请根据描述词找一张确认可下载的图片 URL。描述词:{img-prompt-arr}[{idx}]"]
  35. },
  36. {
  37. "type": "try",
  38. "try":
  39. [
  40. {
  41. "type": "ai",
  42. "method": "text2text",
  43. "inVars":
  44. [
  45. "请根据以下描述词找一张图片,只返回一张确认过可以正常下载的图片 URL(必须是当前可访问、能直接 GET 下载的地址),不要任何说明、markdown 或换行。描述词:{img-prompt-arr}[{idx}]",
  46. "doubao"
  47. ],
  48. "outVars": ["{img-url-arr}"]
  49. },
  50. {
  51. "type": "download",
  52. "inVars": ["{img-url-arr}", "tmp/pic{idx}.png"],
  53. "outVars": []
  54. }
  55. ],
  56. "fail":
  57. [
  58. {
  59. "type": "try",
  60. "try":
  61. [
  62. {
  63. "type": "ai",
  64. "method": "text2text",
  65. "inVars":
  66. [
  67. "请根据描述词找一张图片,只返回一个当前可访问、能直接 GET 下载的图片 URL(不要说明、markdown 或换行)。描述词:{img-prompt-arr}[{idx}]",
  68. "doubao"
  69. ],
  70. "outVars": ["{img-url-arr}"]
  71. },
  72. {
  73. "type": "download",
  74. "inVars": ["{img-url-arr}", "tmp/pic{idx}.png"],
  75. "outVars": []
  76. }
  77. ],
  78. "fail":
  79. [
  80. {
  81. "type": "ai",
  82. "method": "text2text",
  83. "inVars":
  84. [
  85. "请根据描述词找一张图片,只返回一个可访问的图片 URL(仅 URL,无说明)。描述词:{img-prompt-arr}[{idx}]",
  86. "doubao"
  87. ],
  88. "outVars": ["{img-url-arr}"]
  89. },
  90. {
  91. "type": "download",
  92. "inVars": ["{img-url-arr}", "tmp/pic{idx}.png"],
  93. "outVars": []
  94. }
  95. ]
  96. }
  97. ]
  98. },
  99. {
  100. "type": "adb",
  101. "method": "send-img-to-device",
  102. "inVars": ["tmp/pic{idx}.png"],
  103. "outVars": []
  104. }
  105. ]
  106. },
  107. {
  108. "type": "img-center-point-location",
  109. "inVars": ["添加笔记.png", [0.2, 1.6]],
  110. "outVars": ["{pos}"]
  111. },
  112. {
  113. "type": "adb",
  114. "method": "click",
  115. "inVars": ["{pos}"]
  116. },
  117. {
  118. "type": "ocr",
  119. "inVars": ["从相册选择"],
  120. "outVars": ["{pos}"]
  121. },
  122. {
  123. "type": "adb",
  124. "method": "click",
  125. "inVars": ["{pos}"]
  126. },
  127. {
  128. "type": "for",
  129. "indexVariable": "{idx}",
  130. "items": "{img-prompt-arr}",
  131. "body": [
  132. {
  133. "type": "img-center-point-location",
  134. "inVars": ["tmp/pic{idx}.png", [0.2, 1.6]],
  135. "outVars": ["{pos}"]
  136. },
  137. {
  138. "type": "adb",
  139. "method": "click",
  140. "inVars": ["{pos}"]
  141. },
  142. {
  143. "type": "img-center-point-location",
  144. "inVars": ["选中图片.png", [0.2, 1.6]],
  145. "outVars": ["{pos}"]
  146. },
  147. {
  148. "type": "adb",
  149. "method": "click",
  150. "inVars": ["{pos}"]
  151. },
  152. {
  153. "type": "adb",
  154. "method": "keyevent",
  155. "inVars": ["4"],
  156. "outVars": []
  157. }
  158. ]
  159. },
  160. {
  161. "type": "ocr",
  162. "inVars": ["下一步"],
  163. "outVars": ["{pos}"]
  164. },
  165. {
  166. "type": "adb",
  167. "method": "click",
  168. "inVars": ["{pos}"]
  169. },
  170. {
  171. "type": "ocr",
  172. "inVars": ["下一步"],
  173. "outVars": ["{pos}"]
  174. },
  175. {
  176. "type": "adb",
  177. "method": "click",
  178. "inVars": ["{pos}"]
  179. },
  180. {
  181. "type": "adb",
  182. "method": "input",
  183. "inVars": ["{article}"]
  184. },
  185. {
  186. "type": "ocr",
  187. "inVars": ["发布笔记"],
  188. "outVars": ["{pos}"]
  189. },
  190. {
  191. "type": "adb",
  192. "method": "click",
  193. "inVars": ["{pos}"]
  194. },
  195. {
  196. "type": "echo",
  197. "inVars": ["流程结束"]
  198. }
  199. ]
  200. }