{"id":20206,"date":"2025-02-03T23:22:29","date_gmt":"2025-02-03T15:22:29","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=20206"},"modified":"2025-07-17T02:39:31","modified_gmt":"2025-07-16T18:39:31","slug":"julep-ai","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/ja\/julep-ai\/","title":{"rendered":"Julep AI\uff1a\u4f7f\u7528DSL\u6784\u5efa\u591a\u6b65\u9aa4\u667a\u80fd\u4f53\u5de5\u4f5c\u6d41\u7684AI\u4e91\u5e73\u53f0"},"content":{"rendered":"<p>Julep AI \u662f\u4e00\u4e2a\u7528\u4e8e\u521b\u5efa\u548c\u7ba1\u7406AI\u667a\u80fd\u4f53\u7684\u5e73\u53f0\uff0c\u8fd9\u4e9b\u667a\u80fd\u4f53\u53ef\u4ee5\u8bb0\u4f4f\u8fc7\u53bb\u7684\u4e92\u52a8\uff0c\u5e76\u6267\u884c\u590d\u6742\u7684\u591a\u6b65\u9aa4\u4efb\u52a1\u3002Julep AI \u63d0\u4f9b\u4e86\u957f\u671f\u8bb0\u5fc6\u548c\u591a\u6b65\u9aa4\u6d41\u7a0b\u7ba1\u7406\u529f\u80fd\uff0c\u652f\u6301\u4e0e\u5916\u90e8\u5de5\u5177\u548c API \u7684\u96c6\u6210\uff0c\u4f7f\u5176\u80fd\u591f\u5904\u7406\u590d\u6742\u7684\u573a\u666f\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u7b80\u5355\u7684 YAML \u6587\u4ef6\u6765\u5b9a\u4e49\u4efb\u52a1\u7684\u5404\u4e2a\u6b65\u9aa4\u3001\u51b3\u7b56\u70b9\u3001\u5faa\u73af\u548c\u5e76\u884c\u5904\u7406\u7b49\uff0c\u5e76\u5728\u4e91\u7aef\u81ea\u52a8\u6267\u884c\u8fd9\u4e9b\u4efb\u52a1\u3002<\/p>\n<p>Julep AI \u5f15\u5165\u4e86\u4e00\u79cd\u65b0\u7684\u9886\u57df\u7279\u5b9a\u8bed\u8a00\uff08DSL\uff09\u548c\u670d\u52a1\u5668\uff0c\u7528\u4e8e\u7ba1\u7406 AI \u667a\u80fd\u4f53\u548c\u591a\u6b65\u9aa4\u4efb\u52a1\u3002\u8fd9\u79cd DSL \u4f7f\u5f97\u7528\u6237\u80fd\u591f\u66f4\u76f4\u89c2\u5730\u63cf\u8ff0\u548c\u7ba1\u7406\u590d\u6742\u7684\u5de5\u4f5c\u6d41\uff0c\u800c\u65e0\u9700\u7f16\u5199\u5927\u91cf\u7684\u4f20\u7edf\u4ee3\u7801\u3002Julep AI \u7684\u4e91\u5e73\u53f0\u8d1f\u8d23\u6267\u884c\u8fd9\u4e9b\u4efb\u52a1\uff0c\u786e\u4fdd\u4efb\u52a1\u7684\u53ef\u9760\u6027\u548c\u9ad8\u6548\u6027\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-20207\" title=\"Julep AI\uff1a\u4f7f\u7528DSL\u6784\u5efa\u591a\u6b65\u9aa4\u667a\u80fd\u4f53\u5de5\u4f5c\u6d41\u7684AI\u4e91\u5e73\u53f0-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/117576acae562ab.png\" alt=\"Julep AI\uff1a\u4f7f\u7528DSL\u6784\u5efa\u591a\u6b65\u9aa4\u667a\u80fd\u4f53\u5de5\u4f5c\u6d41\u7684AI\u4e91\u5e73\u53f0-1\" width=\"1021\" height=\"561\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/117576acae562ab.png 1021w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/117576acae562ab-768x422.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/117576acae562ab-18x10.png 18w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u6301\u4e45 AI \u4ee3\u7406<\/strong>\uff1a\u667a\u80fd\u4f53\u80fd\u591f\u8bb0\u4f4f\u4e0a\u4e0b\u6587\u548c\u4fe1\u606f\uff0c\u652f\u6301\u957f\u671f\u4ea4\u4e92\u3002<\/li>\n<li><strong>\u72b6\u6001\u4f1a\u8bdd<\/strong>\uff1a\u8ddf\u8e2a\u8fc7\u53bb\u7684\u4e92\u52a8\uff0c\u63d0\u4f9b\u4e2a\u6027\u5316\u7684\u54cd\u5e94\u3002<\/li>\n<li><strong>\u591a\u6b65\u9aa4\u4efb\u52a1<\/strong>\uff1a\u901a\u8fc7\u5faa\u73af\u548c\u51b3\u7b56\u6784\u5efa\u590d\u6742\u7684\u591a\u6b65\u9aa4\u6d41\u7a0b\u3002<\/li>\n<li><strong>\u4efb\u52a1\u7ba1\u7406<\/strong>\uff1a\u5904\u7406\u53ef\u4ee5\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u4efb\u52a1\uff0c\u786e\u4fdd\u4efb\u52a1\u987a\u5229\u5b8c\u6210\u3002<\/li>\n<li><strong>\u5185\u7f6e\u5de5\u5177\u548c API \u96c6\u6210<\/strong>\uff1a\u652f\u6301\u4f7f\u7528\u5185\u7f6e\u5de5\u5177\u548c\u5916\u90e8 API\uff0c\u6269\u5c55\u667a\u80fd\u4f53\u7684\u529f\u80fd\u3002<\/li>\n<li><strong>\u81ea\u6211\u4fee\u590d<\/strong>\uff1a\u81ea\u52a8\u91cd\u8bd5\u5931\u8d25\u7684\u6b65\u9aa4\uff0c\u91cd\u65b0\u53d1\u9001\u6d88\u606f\uff0c\u786e\u4fdd\u4efb\u52a1\u987a\u5229\u8fd0\u884c\u3002<\/li>\n<li><strong>RAG\uff08\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff09<\/strong>\uff1a\u4f7f\u7528\u6587\u6863\u5b58\u50a8\u6784\u5efa\u4e00\u4e2a\u7528\u4e8e\u68c0\u7d22\u548c\u4f7f\u7528\u81ea\u5df1\u6570\u636e\u7684\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<ol>\n<li><strong>\u6ce8\u518c\u8d26\u53f7<\/strong>\uff1a\u8bbf\u95ee Julep AI \u5b98\u7f51\uff0c\u70b9\u51fb\u201c\u6ce8\u518c\u201d\u6309\u94ae\uff0c\u586b\u5199\u5fc5\u8981\u4fe1\u606f\u5b8c\u6210\u6ce8\u518c\u3002<\/li>\n<li><strong>\u83b7\u53d6API\u5bc6\u94a5<\/strong>\uff1a\u767b\u5f55\u540e\uff0c\u5728\u7528\u6237\u9762\u677f\u4e2d\u627e\u5230API\u5bc6\u94a5\u751f\u6210\u9009\u9879\uff0c\u751f\u6210\u5e76\u4fdd\u5b58API\u5bc6\u94a5\u3002<\/li>\n<li><strong>\u4e0b\u8f7dSDK<\/strong>\uff1a\u6839\u636e\u5e73\u53f0\u9700\u6c42\uff0c\u4e0b\u8f7d\u76f8\u5e94\u7684SDK\uff08\u5982Python\u3001Node.js\u7b49\uff09\uff0c\u5e76\u6309\u7167\u6587\u6863\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u6307\u5357<\/h3>\n<h4>\u521b\u5efa\u667a\u80fd\u4f53<\/h4>\n<ol>\n<li><strong>\u5b9a\u4e49\u667a\u80fd\u4f53<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u70b9\u51fb\u201c\u521b\u5efa\u667a\u80fd\u4f53\u201d\uff0c\u586b\u5199\u667a\u80fd\u4f53\u540d\u79f0\u548c\u63cf\u8ff0\u3002<\/li>\n<li><strong>\u914d\u7f6e\u6a21\u578b<\/strong>\uff1a\u9009\u62e9\u9002\u5408\u7684AI\u6a21\u578b\uff08\u5982GPT-4\uff09\uff0c\u5e76\u8bbe\u7f6e\u9ed8\u8ba4\u53c2\u6570\uff08\u5982\u6e29\u5ea6\u3001\u6700\u5927token\u6570\u7b49\uff09\u3002<\/li>\n<li><strong>\u6dfb\u52a0\u5de5\u5177<\/strong>\uff1a\u4e3a\u667a\u80fd\u4f53\u6dfb\u52a0\u6240\u9700\u5de5\u5177\uff0c\u5982\u7f51\u7edc\u641c\u7d22\u3001API\u8c03\u7528\u7b49\u3002<\/li>\n<\/ol>\n<h4>\u5b9a\u4e49\u591a\u6b65\u9aa4\u6d41\u7a0b<\/h4>\n<ol>\n<li><strong>\u7f16\u5199YAML\u6587\u4ef6<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u4f7f\u7528YAML\u7f16\u5199\u591a\u6b65\u9aa4\u6d41\u7a0b\uff0c\u5b9a\u4e49\u51b3\u7b56\u6811\u3001\u5faa\u73af\u548c\u5e76\u884c\u6267\u884c\u3002<\/li>\n<li><strong>\u4e0a\u4f20\u6587\u4ef6<\/strong>\uff1a\u5c06\u7f16\u5199\u597d\u7684YAML\u6587\u4ef6\u4e0a\u4f20\u81f3\u5e73\u53f0\uff0c\u5e76\u8fdb\u884c\u6d4b\u8bd5\u3002<\/li>\n<li><strong>\u90e8\u7f72\u6d41\u7a0b<\/strong>\uff1a\u6d4b\u8bd5\u901a\u8fc7\u540e\uff0c\u70b9\u51fb\u201c\u90e8\u7f72\u201d\u6309\u94ae\uff0c\u5c06\u6d41\u7a0b\u4e0a\u7ebf\u3002<\/li>\n<\/ol>\n<h4>\u5feb\u901f\u539f\u578b\u8bbe\u8ba1<\/h4>\n<ol>\n<li><strong>\u521b\u5efa\u65b0\u9879\u76ee<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u70b9\u51fb\u201c\u65b0\u5efa\u9879\u76ee\u201d\uff0c\u586b\u5199\u9879\u76ee\u540d\u79f0\u548c\u63cf\u8ff0\u3002<\/li>\n<li><strong>\u6dfb\u52a0\u529f\u80fd\u6a21\u5757<\/strong>\uff1a\u6839\u636e\u9700\u6c42\uff0c\u9009\u62e9\u5e76\u6dfb\u52a0\u6240\u9700\u529f\u80fd\u6a21\u5757\uff08\u5982RAG\u3001\u72b6\u6001\u7ba1\u7406\u7b49\uff09\u3002<\/li>\n<li><strong>\u6d4b\u8bd5\u548c\u8fed\u4ee3<\/strong>\uff1a\u5728\u5e73\u53f0\u4e0a\u8fdb\u884c\u6d4b\u8bd5\uff0c\u5b9e\u65f6\u8c03\u6574\u548c\u4f18\u5316\u529f\u80fd\u6a21\u5757\u3002<\/li>\n<\/ol>\n<h4>\u751f\u4ea7\u7ea7\u51c6\u5907<\/h4>\n<ol>\n<li><strong>\u914d\u7f6e\u57fa\u7840\u8bbe\u65bd<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u914d\u7f6e\u57fa\u7840\u8bbe\u65bd\u9009\u9879\uff0c\u5982\u81ea\u52a8\u6269\u5c55\u3001\u8d1f\u8f7d\u5747\u8861\u7b49\u3002<\/li>\n<li><strong>\u8bbe\u7f6e\u9519\u8bef\u5904\u7406<\/strong>\uff1a\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u673a\u5236\uff0c\u786e\u4fdd\u4efb\u52a1\u5728\u5931\u8d25\u65f6\u81ea\u52a8\u91cd\u8bd5\u3002<\/li>\n<li><strong>\u4e0a\u7ebf\u9879\u76ee<\/strong>\uff1a\u5b8c\u6210\u914d\u7f6e\u540e\uff0c\u70b9\u51fb\u201c\u4e0a\u7ebf\u201d\u6309\u94ae\uff0c\u5c06\u9879\u76ee\u63a8\u5411\u751f\u4ea7\u73af\u5883\u3002<\/li>\n<\/ol>\n<h3>\u6a21\u5757\u5316\u8bbe\u8ba1<\/h3>\n<ol>\n<li><strong>\u9009\u62e9\u6a21\u5757<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u6d4f\u89c8\u5e76\u9009\u62e9\u6240\u9700\u6a21\u5757\uff08\u5982\u5916\u90e8API\u8fde\u63a5\u3001LLM\u5207\u6362\u7b49\uff09\u3002<\/li>\n<li><strong>\u62d6\u653e\u96c6\u6210<\/strong>\uff1a\u4f7f\u7528\u62d6\u653e\u754c\u9762\uff0c\u5c06\u6a21\u5757\u96c6\u6210\u5230\u9879\u76ee\u4e2d\u3002<\/li>\n<li><strong>\u6d4b\u8bd5\u548c\u4f18\u5316<\/strong>\uff1a\u5b9e\u65f6\u6d4b\u8bd5\u6a21\u5757\u529f\u80fd\uff0c\u8fdb\u884c\u4f18\u5316\u548c\u8c03\u6574\u3002<\/li>\n<\/ol>\n<h3>\u65e0\u9650\u6269\u5c55<\/h3>\n<ol>\n<li><strong>\u914d\u7f6e\u6269\u5c55\u9009\u9879<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u914d\u7f6e\u81ea\u52a8\u6269\u5c55\u548c\u8d1f\u8f7d\u5747\u8861\u9009\u9879\u3002<\/li>\n<li><strong>\u76d1\u63a7\u6027\u80fd<\/strong>\uff1a\u4f7f\u7528\u5e73\u53f0\u63d0\u4f9b\u7684\u76d1\u63a7\u5de5\u5177\uff0c\u5b9e\u65f6\u76d1\u63a7\u7cfb\u7edf\u6027\u80fd\u548c\u7528\u6237\u5e76\u53d1\u91cf\u3002<\/li>\n<li><strong>\u8c03\u6574\u914d\u7f6e<\/strong>\uff1a\u6839\u636e\u76d1\u63a7\u6570\u636e\uff0c\u8c03\u6574\u6269\u5c55\u548c\u8d1f\u8f7d\u5747\u8861\u914d\u7f6e\uff0c\u786e\u4fdd\u7cfb\u7edf\u7a33\u5b9a\u8fd0\u884c\u3002<\/li>\n<\/ol>\n<h3>\u672a\u6765\u4fdd\u969c<\/h3>\n<ol>\n<li><strong>\u6dfb\u52a0\u65b0\u6a21\u578b<\/strong>\uff1a\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u70b9\u51fb\u201c\u6dfb\u52a0\u65b0\u6a21\u578b\u201d\uff0c\u9009\u62e9\u5e76\u914d\u7f6e\u65b0AI\u6a21\u578b\u3002<\/li>\n<li><strong>\u96c6\u6210\u65b0\u5de5\u5177<\/strong>\uff1a\u6d4f\u89c8\u5e73\u53f0\u63d0\u4f9b\u7684\u65b0\u5de5\u5177\uff0c\u9009\u62e9\u5e76\u96c6\u6210\u5230\u73b0\u6709\u9879\u76ee\u4e2d\u3002<\/li>\n<li><strong>\u6d4b\u8bd5\u548c\u90e8\u7f72<\/strong>\uff1a\u5bf9\u65b0\u6a21\u578b\u548c\u5de5\u5177\u8fdb\u884c\u6d4b\u8bd5\uff0c\u786e\u4fdd\u517c\u5bb9\u6027\u548c\u7a33\u5b9a\u6027\uff0c\u7136\u540e\u90e8\u7f72\u4e0a\u7ebf\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>\u793a\u4f8b\u4efb\u52a1<\/h2>\n<p>Julep \u975e\u5e38\u9002\u5408\u9700\u8981\u8d85\u8d8a\u7b80\u5355\u7684\u63d0\u793a\u54cd\u5e94\u6a21\u578b\u7684 AI \u7528\u4f8b\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<h3>\u5feb\u901f\u793a\u4f8b<\/h3>\n<p>\u60f3\u8c61\u4e00\u4e0b\u4e00\u4e2a\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\u7684\u7814\u7a76 AI \u4ee3\u7406\uff1a<\/p>\n<ul>\n<li>\u9009\u62e9\u4e00\u4e2a\u4e3b\u9898<\/li>\n<li>\u9488\u5bf9\u8be5\u4e3b\u9898\u63d0\u51fa 30 \u4e2a\u641c\u7d22\u67e5\u8be2<\/li>\n<li>\u540c\u65f6\u8fdb\u884c\u7f51\u9875\u641c\u7d22<\/li>\n<li>\u603b\u7ed3\u7ed3\u679c<\/li>\n<li>\u5c06\u6458\u8981\u53d1\u9001\u81f3 Discord<\/li>\n<\/ul>\n<p>\u5728 Julep \u4e2d\uff0c\u8fd9\u5c06\u662f\u4e00\u9879\u5355\u72ec\u7684\u4efb\u52a1\uff0c80\u884c\u4ee3\u7801\u7136\u540e\u8fd0\u884c\u5b8c\u5168\u6258\u7ba1\u5168\u90e8\u72ec\u7acb\u5b8c\u6210\u3002\u6240\u6709\u6b65\u9aa4\u90fd\u5728 Julep \u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0a\u6267\u884c\uff0c\u60a8\u65e0\u9700\u52a8\u624b\u3002<\/p>\n<p>\u8fd9\u662f\u4e00\u4e2a\u6709\u6548\u7684\u4f8b\u5b50\uff1a<\/p>\n<pre><code>name: Research Agent\r\n# Optional: Define the input schema for the task\r\ninput_schema:\r\ntype: object\r\nproperties:\r\ntopic:\r\ntype: string\r\ndescription: The main topic to research\r\nnum_questions:\r\ntype: integer\r\ndescription: The number of search queries to generate\r\n# Define the tools that the agent can use\r\ntools:\r\n- name: web_search\r\ntype: integration\r\nintegration:\r\nprovider: brave\r\nsetup:\r\napi_key: &lt;your-brave-api-key&gt;\r\n- name: discord_webhook\r\ntype: api_call\r\napi_call:\r\nurl: https:\/\/discord.com\/api\/webhooks\/&lt;your-webhook-id&gt;\/&lt;your-webhook-token&gt;\r\nmethod: POST\r\nheaders:\r\nContent-Type: application\/json\r\n# Special variables:\r\n# - inputs: for accessing the input to the task\r\n# - outputs: for accessing the output of previous steps\r\n# - _: for accessing the output of the previous step\r\n# Define the main <a href=\"https:\/\/www.kdjingpai.com\/pt\/workflow\/\">workflow<\/a>\r\nmain:\r\n- prompt:\r\n- role: system\r\ncontent: &gt;-\r\nYou are a research assistant.\r\nGenerate {{inputs[0].num_questions|default(30, true)}} diverse search queries related to the topic:\r\n{{inputs[0].topic}}\r\n\r\nWrite one query per line.\r\nunwrap: true\r\n# Evaluate the search queries using a simple python expression\r\n- evaluate:\r\nsearch_queries: \"_.split(NEWLINE)\"\r\n# Run the web search in parallel for each query\r\n- over: \"_.search_queries\"\r\nmap:\r\ntool: web_search\r\narguments:\r\nquery: \"_\"\r\nparallelism: 5\r\n# Collect the results from the web search\r\n- evaluate:\r\nsearch_results: _\r\n# Summarize the results\r\n- prompt:\r\n- role: system\r\ncontent: &gt;\r\nYou are a research summarizer. Create a comprehensive summary of the following research results on the topic {{inputs[0].topic}}.\r\nThe summary should be well-structured, informative, and highlight key findings and insights. Keep the summary concise and to the point.\r\nThe length of the summary should be less than 150 words.\r\nHere are the search results:\r\n{{_.search_results}}\r\n  unwrap: true\r\nsettings:\r\nmodel: gpt-4o-mini\r\n- evaluate:\r\ndiscord_message: |-\r\nf'''\r\n**Research Summary for {inputs[0].topic}**\r\n{_}\r\n'''\r\n\r\n# Send the summary to Discord\r\n- tool: discord_webhook\r\narguments:\r\njson_: \r\ncontent: _.discord_message[:2000] # Discord has a 2000 <a href=\"https:\/\/www.kdjingpai.com\/pt\/character-ai\/\">character<\/a> limit\r\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0cJulep \u5c06\u81ea\u52a8\u7ba1\u7406\u5e76\u884c\u6267\u884c\uff0c\u91cd\u8bd5\u5931\u8d25\u7684\u6b65\u9aa4\uff0c\u91cd\u65b0\u53d1\u9001 API \u8bf7\u6c42\uff0c\u5e76\u4fdd\u6301\u4efb\u52a1\u53ef\u9760\u8fd0\u884c\u76f4\u5230\u5b8c\u6210\u3002<\/p>\n<h3>\u8f93\u51fa\u7ed3\u679c\u793a\u4f8b<\/h3>\n<p>\u8fd9\u5728 30 \u79d2\u5185\u8fd0\u884c\u5e76\u8fd4\u56de\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n<blockquote>\n<h4>\u4eba\u5de5\u667a\u80fd\u7814\u7a76\u6458\u8981<\/h4>\n<p><strong>\u4eba\u5de5\u667a\u80fd\uff08AI\uff09\u7814\u7a76\u6210\u679c\u6458\u8981<\/strong><\/p>\n<p><strong>\u7b80\u4ecb<\/strong><br \/>\n\u8fd1\u5e74\u6765\uff0c\u4eba\u5de5\u667a\u80fd (AI) \u9886\u57df\u53d6\u5f97\u4e86\u91cd\u5927\u8fdb\u5c55\uff0c\u5176\u7279\u70b9\u662f\u65b9\u6cd5\u548c\u6280\u672f\u7684\u53d1\u5c55\uff0c\u4f7f\u673a\u5668\u80fd\u591f\u611f\u77e5\u73af\u5883\u3001\u4ece\u6570\u636e\u4e2d\u5b66\u4e60\u5e76\u505a\u51fa\u51b3\u7b56\u3002\u672c\u6458\u8981\u4e3b\u8981\u5173\u6ce8\u4ece\u4e0e AI \u76f8\u5173\u7684\u5404\u79cd\u7814\u7a76\u6210\u679c\u4e2d\u83b7\u5f97\u7684\u89c1\u89e3\u3002<\/p>\n<p><strong>\u4e3b\u8981\u53d1\u73b0<\/strong><\/p>\n<ul>\n<li><strong>\u4eba\u5de5\u667a\u80fd\u7684\u5b9a\u4e49\u548c\u8303\u56f4<\/strong>\u00a0\uff1a<br \/>\n\u4eba\u5de5\u667a\u80fd\u88ab\u5b9a\u4e49\u4e3a\u8ba1\u7b97\u673a\u79d1\u5b66\u7684\u4e00\u4e2a\u5206\u652f\uff0c\u4e13\u6ce8\u4e8e\u521b\u5efa\u80fd\u591f\u6267\u884c\u9700\u8981\u7c7b\u4f3c\u4eba\u7c7b\u667a\u80fd\u7684\u4efb\u52a1\u7684\u7cfb\u7edf\uff0c\u5305\u62ec\u5b66\u4e60\u3001\u63a8\u7406\u548c\u89e3\u51b3\u95ee\u9898\uff08\u7ef4\u57fa\u767e\u79d1\uff09\u3002\u5b83\u6db5\u76d6\u4e86\u5404\u79cd\u5b50\u9886\u57df\uff0c\u5305\u62ec\u673a\u5668\u5b66\u4e60\u3001\u81ea\u7136\u8bed\u8a00\u5904\u7406\u3001\u673a\u5668\u4eba\u548c\u8ba1\u7b97\u673a\u89c6\u89c9\u3002<\/li>\n<li><strong>\u5f71\u54cd\u4e0e\u5e94\u7528<\/strong>\u00a0\uff1a<br \/>\nAI \u6280\u672f\u6b63\u5728\u878d\u5165\u4f17\u591a\u9886\u57df\uff0c\u63d0\u9ad8\u6548\u7387\u548c\u751f\u4ea7\u529b\u3002\u5e94\u7528\u8303\u56f4\u4ece\u81ea\u52a8\u9a7e\u9a76\u6c7d\u8f66\u548c\u533b\u7597\u8bca\u65ad\u5230\u5ba2\u6237\u670d\u52a1\u81ea\u52a8\u5316\u548c\u8d22\u52a1\u9884\u6d4b\uff08OpenAI\uff09\u3002\u8c37\u6b4c\u81f4\u529b\u4e8e\u8ba9\u4eba\u5de5\u667a\u80fd\u9020\u798f\u6bcf\u4e2a\u4eba\uff0c\u8fd9\u51f8\u663e\u4e86\u5176\u901a\u8fc7\u589e\u5f3a\u5404\u4e2a\u5e73\u53f0\u7684\u7528\u6237\u4f53\u9a8c\uff08\u8c37\u6b4c\u4eba\u5de5\u667a\u80fd\uff09\u663e\u8457\u6539\u5584\u65e5\u5e38\u751f\u6d3b\u7684\u6f5c\u529b\u3002<\/li>\n<li><strong>\u9053\u5fb7\u8003\u8651<\/strong>\u00a0\uff1a<br \/>\n\u5173\u4e8e\u4eba\u5de5\u667a\u80fd\u7684\u4f26\u7406\u5f71\u54cd\u7684\u8ba8\u8bba\u4e00\u76f4\u5728\u8fdb\u884c\u4e2d\uff0c\u5305\u62ec\u5bf9\u9690\u79c1\u3001\u504f\u89c1\u548c\u51b3\u7b56\u8fc7\u7a0b\u4e2d\u7684\u8d23\u4efb\u7684\u62c5\u5fe7\u3002\u5f3a\u8c03\u9700\u8981\u4e00\u4e2a\u786e\u4fdd\u5b89\u5168\u548c\u8d1f\u8d23\u4efb\u5730\u4f7f\u7528\u4eba\u5de5\u667a\u80fd\u6280\u672f\u7684\u6846\u67b6\uff08OpenAI\uff09\u3002<\/li>\n<li><strong>\u5b66\u4e60\u673a\u5236<\/strong>\u00a0\uff1a<br \/>\nAI \u7cfb\u7edf\u5229\u7528\u4e0d\u540c\u7684\u5b66\u4e60\u673a\u5236\uff0c\u4f8b\u5982\u76d1\u7763\u5b66\u4e60\u3001\u65e0\u76d1\u7763\u5b66\u4e60\u548c\u5f3a\u5316\u5b66\u4e60\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5141\u8bb8 AI \u901a\u8fc7\u4ece\u8fc7\u53bb\u7684\u7ecf\u9a8c\u548c\u6570\u636e\u4e2d\u5b66\u4e60\u6765\u63d0\u9ad8\u6027\u80fd\uff08\u7ef4\u57fa\u767e\u79d1\uff09\u3002\u76d1\u7763\u5b66\u4e60\u548c\u65e0\u76d1\u7763\u5b66\u4e60\u4e4b\u95f4\u7684\u533a\u522b\u81f3\u5173\u91cd\u8981\uff1b\u76d1\u7763\u5b66\u4e60\u4f9d\u8d56\u4e8e\u6807\u8bb0\u6570\u636e\uff0c\u800c\u65e0\u76d1\u7763\u5b66\u4e60\u5219\u8bc6\u522b\u6ca1\u6709\u9884\u5b9a\u4e49\u6807\u7b7e\u7684\u6a21\u5f0f\uff08\u65e0\u76d1\u7763\uff09\u3002<\/li>\n<li><strong>\u672a\u6765\u65b9\u5411<\/strong>\u00a0\uff1a<br \/>\n\u672a\u6765\u4eba\u5de5\u667a\u80fd\u7684\u53d1\u5c55\u9884\u8ba1\u5c06\u4e13\u6ce8\u4e8e\u589e\u5f3a\u4eba\u5de5\u667a\u80fd\u7cfb\u7edf\u7684\u53ef\u89e3\u91ca\u6027\u548c\u900f\u660e\u5ea6\uff0c\u786e\u4fdd\u5b83\u4eec\u80fd\u591f\u63d0\u4f9b\u5408\u7406\u7684\u51b3\u7b56\u548c\u884c\u52a8\uff08OpenAI\uff09\u3002\u4eba\u4eec\u8fd8\u5728\u52aa\u529b\u4f7f\u4eba\u5de5\u667a\u80fd\u7cfb\u7edf\u66f4\u6613\u4e8e\u8bbf\u95ee\u548c\u7528\u6237\u53cb\u597d\uff0c\u9f13\u52b1\u4e0d\u540c\u4eba\u7fa4\u548c\u884c\u4e1a\u66f4\u5e7f\u6cdb\u5730\u91c7\u7528\u5b83\uff08\u8c37\u6b4c\u4eba\u5de5\u667a\u80fd\uff09\u3002<\/li>\n<\/ul>\n<p><strong>\u7ed3\u8bba<\/strong><br \/>\n\u4eba\u5de5\u667a\u80fd\u4ee3\u8868\u7740\u8de8\u591a\u4e2a\u9886\u57df\u7684\u53d8\u9769\u529b\u91cf\uff0c\u6709\u671b\u91cd\u5851\u884c\u4e1a\u5e76\u6539\u5584\u751f\u6d3b\u8d28\u91cf\u3002\u7136\u800c\uff0c\u968f\u7740\u5176\u80fd\u529b\u7684\u6269\u5c55\uff0c\u89e3\u51b3\u968f\u4e4b\u800c\u6765\u7684\u4f26\u7406\u548c\u793e\u4f1a\u5f71\u54cd\u81f3\u5173\u91cd\u8981\u3002\u6280\u672f\u4e13\u5bb6\u3001\u4f26\u7406\u5b66\u5bb6\u548c\u653f\u7b56\u5236\u5b9a\u8005\u4e4b\u95f4\u7684\u6301\u7eed\u7814\u7a76\u548c\u5408\u4f5c\u5bf9\u4e8e\u9a7e\u9a6d\u4eba\u5de5\u667a\u80fd\u7684\u672a\u6765\u683c\u5c40\u81f3\u5173\u91cd\u8981\u3002<\/p><\/blockquote>\n<h3>Python \u90e8\u7f72\u8fc7\u7a0b<\/h3>\n<p>\u8981\u5f00\u59cb\u4f7f\u7528 Julep\uff0c\u8bf7\u4f7f\u7528 pip \u5b89\u88c5\u5b83\uff1a<\/p>\n<pre><code>pip install julep\r\n<\/code><\/pre>\n<p>\u4ece\u6b64\u5904\u83b7\u53d6\u60a8\u7684 API \u5bc6\u94a5\u3002<\/p>\n<pre>### Step 0: Setup\r\n\r\nimport time\r\nimport yaml\r\nfrom julep import Julep # or AsyncJulep\r\n\r\nclient = Julep(api_key=\"your_julep_api_key\")\r\n\r\n### Step 1: Create an Agent\r\n\r\nagent = client.agents.create(\r\nname=\"Storytelling Agent\",\r\nmodel=\"claude-3.5-sonnet\",\r\nabout=\"You are a creative storyteller that crafts engaging stories on a myriad of topics.\",\r\n)\r\n\r\n### Step 2: Create a Task that generates a <a href=\"https:\/\/www.kdjingpai.com\/pt\/storyvideos\/\">story<\/a> and comic strip\r\n\r\ntask_yaml = \"\"\"\r\nname: Storyteller\r\ndescription: Create a story based on an idea.\r\n\r\ntools:\r\n- name: research_wikipedia\r\ntype: integration\r\nintegration:\r\nprovider: wikipedia\r\nmethod: search\r\n\r\nmain:\r\n# Step 1: Generate plot idea\r\n- prompt:\r\n- role: system\r\ncontent: You are {{agent.name}}. {{agent.about}}\r\n- role: user\r\ncontent: &gt;\r\nBased on the idea '{{_.idea}}', generate a list of 5 plot ideas. Go crazy and be as creative as possible. Return your output as a list of long strings inside ```yaml \u6807\u7b7e\u4f4d\u4e8e\u60a8\u7684\u56de\u590d\u672b\u5c3e\u3002\r\n\u5c55\u5f00\uff1atrue\r\n\r\n- \u8bc4\u4ef7\uff1a\r\n\u60c5\u8282\u60f3\u6cd5\uff1aload_yaml\uff08_.split\uff08'```yaml')[1].split('```')[0].strip())\r\n\r\n# \u7b2c\u4e8c\u6b65\uff1a\u4ece\u60c5\u8282\u601d\u8def\u4e2d\u63d0\u53d6\u7814\u7a76\u9886\u57df\r\n- \u8fc5\u901f\u7684\uff1a\r\n- \u89d2\u8272\uff1a\u7cfb\u7edf\r\n\u5185\u5bb9\uff1a\u60a8\u662f {{agent.name}}\u3002{{agent.about}}\r\n- \u89d2\u8272\uff1a\u7528\u6237\r\n\u5185\u5bb9: &gt;\r\n\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6545\u4e8b\u60c5\u8282\u7684\u60f3\u6cd5\uff1a\r\n{% \u8868\u793a _.plot_ideas \u4e2d\u7684\u60f3\u6cd5 %}\r\n- {{\u4e3b\u610f}}\r\n{% \u7ed3\u675f %}\r\n\r\n\u4e3a\u4e86\u53d1\u5c55\u6545\u4e8b\u60c5\u8282\uff0c\u6211\u4eec\u9700\u8981\u7814\u7a76\u60c5\u8282\u601d\u8def\u3002\r\n\u6211\u4eec\u5e94\u8be5\u7814\u7a76\u4ec0\u4e48\uff1f\u5199\u4e0b\u4f60\u8ba4\u4e3a\u6709\u8da3\u7684\u60c5\u8282\u60f3\u6cd5\u7684\u7ef4\u57fa\u767e\u79d1\u641c\u7d22\u67e5\u8be2\u3002\r\n\u5c06\u8f93\u51fa\u4f5c\u4e3a yaml \u5217\u8868\u8fd4\u56de```yaml tags at the end of your response.\r\nunwrap: true\r\nsettings:\r\nmodel: gpt-4o-mini\r\ntemperature: 0.7\r\n\r\n- evaluate:\r\nresearch_queries: load_yaml(_.split('```yaml')[1].split('```')[0].strip())\r\n\r\n# Step 3: Research each plot idea\r\n- foreach:\r\nin: _.research_queries\r\ndo:\r\ntool: research_wikipedia\r\narguments:\r\nquery: _\r\n\r\n- evaluate:\r\nwikipedia_results: 'NEWLINE.join([f\"- {doc.metadata.title}: {doc.metadata.summary}\" for item in _ for doc in item.documents])'\r\n\r\n# Step 4: Think and deliberate\r\n- prompt:\r\n- role: system\r\ncontent: You are {{agent.name}}. {{agent.about}}\r\n- role: user\r\ncontent: |-\r\nBefore we write the story, let's think and deliberate. Here are some plot ideas:\r\n{% for idea in outputs[1].plot_ideas %}\r\n- {{idea}}\r\n{% endfor %}\r\n\r\nHere are the results from researching the plot ideas on Wikipedia:\r\n{{_.wikipedia_results}}\r\n\r\nThink about the plot ideas critically. Combine the plot ideas with the results from Wikipedia to create a detailed plot for a story.\r\nWrite down all your notes and thoughts.\r\nThen finally write the plot as a yaml object inside ```yaml \u6807\u7b7e\u4f4d\u4e8e\u54cd\u5e94\u672b\u5c3e\u3002yaml \u5bf9\u8c61\u5e94\u5177\u6709\u4ee5\u4e0b\u7ed3\u6784\uff1a\r\n\r\n```yaml\r\ntitle: \"&lt;string&gt;\"\r\ncharacters:\r\n- name: \"&lt;string&gt;\"\r\nabout: \"&lt;string&gt;\"\r\nsynopsis: \"&lt;string&gt;\"\r\nscenes:\r\n- title: \"&lt;string&gt;\"\r\ndescription: \"&lt;string&gt;\"\r\ncharacters:\r\n- name: \"&lt;string&gt;\"\r\nrole: \"&lt;string&gt;\"\r\nplotlines:\r\n- \"&lt;string&gt;\"```\r\n\r\n\u786e\u4fdd yaml \u6709\u6548\uff0c\u4e14\u89d2\u8272\u548c\u573a\u666f\u4e0d\u4e3a\u7a7a\u3002\u8fd8\u8981\u6ce8\u610f\u5206\u53f7\u548c\u7f16\u5199 yaml \u7684\u5176\u4ed6\u95ee\u9898\u3002\r\n\u5c55\u5f00\uff1atrue\r\n\r\n- \u8bc4\u4ef7\uff1a\r\n\u60c5\u8282\uff1a\u201cload_yaml\uff08_.split\uff08'```yaml')[1].split('```')[0].strip())\u201d\r\n\"\"\"\r\n\r\n\u4efb\u52a1 = \u5ba2\u6237\u7aef.\u4efb\u52a1.\u521b\u5efa\uff08\r\nagent_id=\u4ee3\u7406.id\uff0c\r\n**yaml.safe_load\uff08\u4efb\u52a1_yaml\uff09\r\n)\r\n\r\n### \u6b65\u9aa4 3\uff1a\u6267\u884c\u4efb\u52a1\r\n\r\n\u6267\u884c = \u5ba2\u6237\u7aef.\u6267\u884c.\u521b\u5efa\uff08\r\n\u4efb\u52a1ID=\u4efb\u52a1ID\uff0c\r\n\u8f93\u5165={\u201cidea\u201d\uff1a\u201c\u4e00\u53ea\u5b66\u98de\u7684\u732b\u201d}\r\n)\r\n\r\n# \ud83c\udf89 \u89c2\u770b\u6545\u4e8b\u548c\u6f2b\u753b\u9762\u677f\u7684\u751f\u6210\r\nwhile (result := client.executions.get(execution.id)).status \u4e0d\u5728 ['\u6210\u529f', '\u5931\u8d25'] \u4e2d\uff1a\r\n\u6253\u5370\uff08\u7ed3\u679c.\u72b6\u6001\uff0c\u7ed3\u679c.\u8f93\u51fa\uff09\r\n\u65f6\u95f4.\u7761\u7720(1)\r\n\r\n# \ud83d\udce6\u6267\u884c\u5b8c\u6210\u540e\uff0c\u68c0\u7d22\u7ed3\u679c\r\n\u5982\u679c result.status ==\u201c\u6210\u529f\u201d\uff1a\r\n\u6253\u5370\uff08\u7ed3\u679c.\u8f93\u51fa\uff09\r\n\u522b\u7684\uff1a\r\n\u5f15\u53d1\u5f02\u5e38\uff08\u7ed3\u679c.\u9519\u8bef\uff09<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Julep AI \u662f\u4e00\u4e2a\u7528\u4e8e\u521b\u5efa\u548c\u7ba1\u7406AI\u667a\u80fd\u4f53\u7684\u5e73\u53f0\uff0c\u8fd9\u4e9b\u667a\u80fd\u4f53\u53ef\u4ee5\u8bb0\u4f4f\u8fc7\u53bb\u7684\u4e92\u52a8\uff0c\u5e76\u6267\u884c\u590d\u6742\u7684\u591a\u6b65\u9aa4\u4efb\u52a1\u3002Julep AI \u63d0\u4f9b\u4e86\u957f\u671f\u8bb0\u5fc6\u548c\u591a\u6b65\u9aa4\u6d41\u7a0b\u7ba1\u7406\u529f\u80fd\uff0c\u652f\u6301\u4e0e\u5916\u90e8\u5de5\u5177\u548c API \u7684\u96c6\u6210\uff0c\u4f7f\u5176\u80fd\u591f\u5904\u7406\u590d\u6742\u7684\u573a\u666f\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u7b80&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61772,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[425,20,476],"tags":[208,201],"class_list":["post-20206","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-professional","category-tool","category-agent-development","tag-aikaifangfuwu","tag-aizhinengti"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/20206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/comments?post=20206"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/20206\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media\/61772"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media?parent=20206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/categories?post=20206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/tags?post=20206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}