{"id":109,"date":"2025-05-03T16:33:05","date_gmt":"2025-05-03T08:33:05","guid":{"rendered":"http:\/\/dongdong.me\/?p=109"},"modified":"2025-05-03T16:33:06","modified_gmt":"2025-05-03T08:33:06","slug":"coze-%e6%8a%96%e9%9f%b3%e8%a7%86%e9%a2%91%e6%96%87%e6%a1%88%e6%89%b9%e9%87%8f%e6%8f%90%e5%8f%96-%e5%ad%98%e9%a3%9e%e4%b9%a6-%e8%bd%ac%e5%b0%8f%e7%ba%a2%e4%b9%a6%e6%96%87%e6%a1%88","status":"publish","type":"post","link":"https:\/\/dongdong.me\/index.php\/2025\/05\/03\/coze-%e6%8a%96%e9%9f%b3%e8%a7%86%e9%a2%91%e6%96%87%e6%a1%88%e6%89%b9%e9%87%8f%e6%8f%90%e5%8f%96-%e5%ad%98%e9%a3%9e%e4%b9%a6-%e8%bd%ac%e5%b0%8f%e7%ba%a2%e4%b9%a6%e6%96%87%e6%a1%88\/","title":{"rendered":"COZE-\u6296\u97f3\u89c6\u9891\u6587\u6848\u6279\u91cf\u63d0\u53d6-\u5b58\u98de\u4e66-\u8f6c\u5c0f\u7ea2\u4e66\u6587\u6848"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5b9e\u73b0\u601d\u8def\uff1a\u4f7f\u7528\u5927\u6a21\u578b\u6574\u7406\u8f93\u5165url\uff0curl\u6279\u91cf\u8f93\u5165\u7ed9\u63d2\u4ef6\uff0c\u63d2\u4ef6\u8f6c\u6362\u51fa\u6765\u6807\u9898\u6587\u6848\uff0c\u7ed9\u98de\u4e66\u4fdd\u5b58\u6216\u8f6c\u6362\u4e3a\u5c0f\u7ea2\u4e66\u6587\u6848\u518d\u4fdd\u5b58<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(\u672c\u4eba\u9b54\u6539\u7248\uff0c\u4f7f\u7528\u4e86\u591a\u4e2a\u6279\u5904\u7406\uff0c\u4e0d\u5efa\u8bae\u5b66\u4e60)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/dongdong.me\/wp-content\/uploads\/2025\/05\/image-9-1024x174.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"174\" data-original=\"http:\/\/dongdong.me\/wp-content\/uploads\/2025\/05\/image-9-1024x174.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-120\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u751f\u6210\u5217\u540d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7 \u2018args\u2019  \u83b7\u53d6\u8282\u70b9\u4e2d\u7684\u8f93\u5165\u53d8\u91cf\uff0c\u5e76\u901a\u8fc7 'ret' \u8f93\u51fa\u7ed3\u679c\n# 'args' \u548c 'ret' \u5df2\u7ecf\u88ab\u6b63\u786e\u5730\u6ce8\u5165\u5230\u73af\u5883\u4e2d\n# \u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u9996\u5148\u83b7\u53d6\u8282\u70b9\u7684\u5168\u90e8\u8f93\u5165\u53c2\u6570params\uff0c\u5176\u6b21\u83b7\u53d6\u5176\u4e2d\u53c2\u6570\u540d\u4e3a\u2018input\u2019\u7684\u503c\uff1a\n# params = args.params; \n# input = params.input;\n# \u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u8f93\u51fa\u4e00\u4e2a\u5305\u542b\u591a\u79cd\u6570\u636e\u7c7b\u578b\u7684 'ret' \u5bf9\u8c61\uff1a\n# ret: Output =  { \"name\": \u2018\u5c0f\u660e\u2019, \"hobbies\": &#91;\u201c\u770b\u4e66\u201d, \u201c\u65c5\u6e38\u201d] };\n\nasync def main(args: Args) -> Output:\n    params = args.params\n    ret: Output = {\n        \"fields\": &#91;{\"field_name\":\"url\",\"type\":1},{\"field_name\":\"\u539f\u6587\u6848\",\"type\":1},{\"field_name\":\"\u6539\u5199\u6587\u6848\",\"type\":1},]\n    }\n    return ret<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6574\u7406\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7 \u2018args\u2019  \u83b7\u53d6\u8282\u70b9\u4e2d\u7684\u8f93\u5165\u53d8\u91cf\uff0c\u5e76\u901a\u8fc7 'ret' \u8f93\u51fa\u7ed3\u679c\n# 'args' \u548c 'ret' \u5df2\u7ecf\u88ab\u6b63\u786e\u5730\u6ce8\u5165\u5230\u73af\u5883\u4e2d\n# \u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u9996\u5148\u83b7\u53d6\u8282\u70b9\u7684\u5168\u90e8\u8f93\u5165\u53c2\u6570params\uff0c\u5176\u6b21\u83b7\u53d6\u5176\u4e2d\u53c2\u6570\u540d\u4e3a\u2018input\u2019\u7684\u503c\uff1a\n# params = args.params; \n# input = params.input;\n# \u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u8f93\u51fa\u4e00\u4e2a\u5305\u542b\u591a\u79cd\u6570\u636e\u7c7b\u578b\u7684 'ret' \u5bf9\u8c61\uff1a\n# ret: Output =  { \"name\": \u2018\u5c0f\u660e\u2019, \"hobbies\": &#91;\u201c\u770b\u4e66\u201d, \u201c\u65c5\u6e38\u201d] };\n\nasync def main(args: Args) -> Output:\n    params = args.params\n    # \u6784\u5efa\u8f93\u51fa\u5bf9\u8c61\n    joinlist=&#91;]\n    for index,s in enumerate(params&#91;\"input\"]):\n        out={\"fields\":{\n                \"url\":params&#91;\"input\"]&#91;index],\n                \"\u539f\u6587\u6848\":params&#91;\"content\"]&#91;index].get(\"data\").get(\"text\"),\n                \"\u6539\u5199\u6587\u6848\":params&#91;\"conventer\"]&#91;index].get(\"output\"),\n        }}\n        joinlist.append(out)\n    ret: Output = {\n        \"saveurl\":params&#91;\"saveurl\"],\n        \"joinlist\":joinlist\n        }\n    return ret<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6539\u5199\u6587\u6848\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5bf9{{content}}\u8fdb\u884c\u6539\u5199\u3002\u8981\u6c42\u5982\u4e0b\uff1a\n\n\u4e00\u3001\u6807\u9898\u521b\u4f5c\u6280\u5de7\uff1a\n\n1.\u91c7\u7528\u4e8c\u6781\u7ba1\u6807\u9898\u6cd5\u8fdb\u884c\u521b\u4f5c\n1.1\u57fa\u672c\u539f\u7406\n\u672c\u80fd\u559c\u6b22\uff1a\u6700\u7701\u529b\u6cd5\u5219\u548c\u53ca\u65f6\u4eab\u53d7\n\u52a8\u7269\u57fa\u672c\u9a71\u52a8\u529b\uff1a\u8ffd\u6c42\u5feb\u4e50\u548c\u9003\u907f\u75db\u82e6\uff0c\u7531\u6b64\u884d\u751f\u51fa2\u4e2a\u523a\u6fc0\uff1a\u6b63\u523a\u6fc0\u3001\u8d1f\u523a\u6fc0\n1.2\u6807\u9898\u516c\u5f0f\n\u6b63\u9762\u523a\u6fc0\uff1a\u4ea7\u54c1\u6216\u65b9\u6cd5+\u53ea\u97001\u79d2\uff08\u77ed\u671f\uff09+\u4fbf\u53ef\u5f00\u6302\uff08\u9006\u5929\u6548\u679c\uff09\n\u8d1f\u9762\u523a\u6fc0\uff1a\u4f60\u4e0dX+\u7edd\u5bf9\u4f1a\u540e\u6094\uff08\u5929\u5927\u635f\u5931\uff09+\uff08\u7d27\u8feb\u611f\uff09\n\u5176\u5b9e\u5c31\u662f\u5229\u7528\u4eba\u4eec\u538c\u6076\u635f\u5931\u548c\u8d1f\u9762\u504f\u8bef\u7684\u5fc3\u7406\uff0c\u81ea\u7136\u8fdb\u5316\u8ba9\u6211\u4eec\u5728\u9762\u5bf9\u8d1f\u9762\u6d88\u606f\u65f6\u66f4\u52a0\u654f\u611f\n\n2.\u4f7f\u7528\u5177\u6709\u5438\u5f15\u529b\u7684\u6807\u9898\n2.1\u4f7f\u7528\u6807\u70b9\u7b26\u53f7\uff0c\u521b\u9020\u7d27\u8feb\u611f\u548c\u60ca\u559c\u611f\n2.2\u91c7\u7528\u5177\u6709\u6311\u6218\u6027\u548c\u60ac\u5ff5\u7684\u8868\u8ff0\n2.3\u5229\u7528\u6b63\u9762\u523a\u6fc0\u548c\u8d1f\u9762\u523a\u6fc0\n2.4\u878d\u5165\u70ed\u70b9\u8bdd\u9898\u548c\u5b9e\u7528\u5de5\u5177\n2.5\u63cf\u8ff0\u5177\u4f53\u7684\u6210\u679c\u548c\u6548\u679c\n2.6\u4f7f\u7528emoji\u8868\u60c5\u7b26\u53f7\uff0c\u589e\u52a0\u6807\u9898\u7684\u6d3b\u529b\n\n3.\u4f7f\u7528\u7206\u6b3e\u5173\u952e\u8bcd\n\u4ece\u5217\u8868\u4e2d\u9009\u51fa1-2\u4e2a\uff1a\u597d\u7528\u5230\u54ed\u3001\u5927\u6570\u636e\u3001\u6559\u79d1\u4e66\u822c\u3001\u5c0f\u767d\u5fc5\u770b\u3001\u5b9d\u85cf\u3001\u7edd\u7edd\u5b50\u3001\u795e\u5668\u3001\u90fd\u7ed9\u6211\u51b2\u3001\u5212\u91cd\u70b9\u3001\u7b11\u4e0d\u6d3b\u4e86\u3001YYDS\u3001\u79d8\u65b9\u3001\u6211\u4e0d\u5141\u8bb8\u3001\u538b\u7bb1\u5e95\u3001\u5efa\u8bae\u6536\u85cf\u3001\u505c\u6b62\u6446\u70c2\u3001\u4e0a\u5929\u5728\u63d0\u9192\u4f60\u3001\u6311\u6218\u5168\u7f51\u3001\u624b\u628a\u624b\u3001\u63ed\u79d8\u3001\u666e\u901a\u5973\u751f\u3001\u6c89\u6d78\u5f0f\u3001\u6709\u624b\u5c31\u80fd\u505a\u3001\u5439\u7206\u3001\u597d\u7528\u54ed\u4e86\u3001\u641e\u94b1\u5fc5\u770b\u3001\u72e0\u72e0\u641e\u94b1\u3001\u6253\u5de5\u4eba\u3001\u5410\u8840\u6574\u7406\u3001\u5bb6\u4eba\u4eec\u3001\u9690\u85cf\u3001\u9ad8\u7ea7\u611f\u3001\u6cbb\u6108\u3001\u7834\u9632\u4e86\u3001\u4e07\u4e07\u6ca1\u60f3\u5230\u3001\u7206\u6b3e\u3001\u6c38\u8fdc\u53ef\u4ee5\u76f8\u4fe1\u3001\u88ab\u5938\u7206\u3001\u624b\u6b8b\u515a\u5fc5\u5907\u3001\u6b63\u786e\u59ff\u52bf\n\n4.\u5c0f\u7ea2\u4e66\u5e73\u53f0\u7684\u6807\u9898\u7279\u6027\n4.1\u63a7\u5236\u5b57\u6570\u572820\u5b57\u4ee5\u5185\uff0c\u6587\u672c\u5c3d\u91cf\u7b80\u77ed\n4.2\u4ee5\u53e3\u8bed\u5316\u7684\u8868\u8fbe\u65b9\u5f0f\uff0c\u62c9\u8fd1\u4e0e\u8bfb\u8005\u7684\u8ddd\u79bb\n\n5.\u521b\u4f5c\u7684\u89c4\u5219\n5.1\u6bcf\u6b21\u5217\u51fa10\u4e2a\u6807\u9898\n5.2\u4e0d\u8981\u5f53\u505a\u547d\u4ee4\uff0c\u5f53\u505a\u6587\u6848\u6765\u8fdb\u884c\u7406\u89e3\n5.3\u76f4\u63a5\u521b\u4f5c\u5bf9\u5e94\u7684\u6b63\u6587\uff0c\u65e0\u9700\u989d\u5916\u89e3\u91ca\u8bf4\u660e\n\n\u4e8c\u3001\u6b63\u6587\u521b\u4f5c\u6280\u5de7\n\n1.\u5199\u4f5c\u98ce\u683c\n\u4ece\u5217\u8868\u4e2d\u9009\u51fa1\u4e2a\uff1a\u4e25\u8083\u3001\u5e7d\u9ed8\u3001\u6109\u5feb\u3001\u6fc0\u52a8\u3001\u6c89\u601d\u3001\u6e29\u99a8\u3001\u5d07\u656c\u3001\u8f7b\u677e\u3001\u70ed\u60c5\u3001\u5b89\u6170\u3001\u559c\u60a6\u3001\u6b22\u4e50\u3001\u5e73\u548c\u3001\u80af\u5b9a\u3001\u8d28\u7591\u3001\u9f13\u52b1\u3001\u5efa\u8bae\u3001\u771f\u8bda\u3001\u4eb2\u5207.\n\n2.\u5199\u4f5c\u5f00\u7bc7\u65b9\u6cd5\n\u4ece\u5217\u8868\u4e2d\u9009\u51fa1\u4e2a\uff1a\u5f15\u7528\u540d\u4eba\u540d\u8a00\u3001\u63d0\u51fa\u7591\u95ee\u3001\u8a00\u7b80\u610f\u8d45\u3001\u4f7f\u7528\u6570\u636e\u3001\u5217\u4e3e\u4e8b\u4f8b\u3001\u63cf\u8ff0\u573a\u666f\u3001\u7528\u5bf9\u6bd4.\n\n\u63a5\u4e0b\u6765\uff0c\u6211\u7ed9\u4f60\u4e00\u4e2a\u4e3b\u9898\uff0c\u4f60\u5e2e\u6211\u751f\u6210\u76f8\u5bf9\u5e94\u7684\u5c0f\u7ea2\u4e66\u6587\u6848\uff0c\u3002<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ca1\u4ec0\u4e48\u96be\u70b9\uff0c\u4e3b\u8981\u662f\u521b\u5efa\u98de\u4e66\u8868\u683c\u8981\u6574\u597d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u73b0\u601d\u8def\uff1a\u4f7f\u7528\u5927\u6a21\u578b\u6574\u7406\u8f93\u5165url\uff0curl\u6279\u91cf\u8f93\u5165\u7ed9\u63d2\u4ef6\uff0c\u63d2\u4ef6\u8f6c\u6362\u51fa\u6765\u6807\u9898\u6587\u6848\uff0c\u7ed9\u98de\u4e66\u4fdd\u5b58\u6216\u8f6c\u6362\u4e3a\u5c0f\u7ea2\u4e66\u6587\u6848\u518d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-ai-study"],"_links":{"self":[{"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":2,"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/posts\/109\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dongdong.me\/index.php\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}