{"id":15061,"date":"2024-11-14T17:35:08","date_gmt":"2024-11-14T09:35:08","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=15061"},"modified":"2024-12-09T17:36:56","modified_gmt":"2024-12-09T09:36:56","slug":"difyzhongzidaidemenai","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/en\/difyzhongzidaidemenai\/","title":{"rendered":"Dify\u4e2d\u81ea\u5e26\u7684\u95e8\u8bca\u5bfc\u8bca\u5de5\u4f5c\u6d41\uff08chatflow\uff09"},"content":{"rendered":"<p>\u6ce8\u89e3\uff1a\u672c\u6587\u4f7f\u7528Dify v0.7.2\u7248\u672c\u3002<\/p>\n<p>\u6b64\u804a\u5929\u6d41\u7a0b\u5c55\u793a\u4e86\u5982\u4f55\u6784\u5efa\u4e00\u4e2a\u7528\u4e8e\u95e8\u8bca\u5bfc\u8bca\u7684\u804a\u5929\u673a\u5668\u4eba\uff0c\u53ef\u901a\u8fc7\u7f51\u9875\u6216\u8bed\u97f3\u5bf9\u8bdd\u6765\u6536\u96c6\u75c5\u4eba\u7684\u6570\u636e\u3002\u7b80\u5355\u7406\u89e3\uff0c\u5373\u6839\u636e\u60a3\u8005\u4fe1\u606f\uff08\u5e74\u9f84\u3001\u6027\u522b\u548c\u75c7\u72b6\uff09\uff0c\u7ed9\u60a3\u8005\u63a8\u8350\u79d1\u5ba4\u3002<\/p>\n<h2>\u4e00.\u5de5\u4f5c\u6d41\u601d\u8def<\/h2>\n<h3>1.\u5de5\u4f5c\u6d41\u622a\u56fe<\/h3>\n<p>\u95e8\u8bca\u5bfc\u8bca\u5b8c\u6574\u5de5\u4f5c\u6d41\u622a\u56fe\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" title=\"-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-14.jpg\" alt=\"-1\" \/><\/p>\n<h3>2.\u5de5\u4f5c\u6d41\u4f2a\u6d41\u7a0b\u56fe<\/h3>\n<p>\u95e8\u8bca\u5bfc\u8bca\u5de5\u4f5c\u6d41\u7684\u76ee\u7684\u662f\u6839\u636e\u60a3\u8005\u8f93\u5165\u7684\u5e74\u9f84\u3001\u6027\u522b\u548c\u75c7\u72b6\uff0c\u7ed9\u60a3\u8005\u63a8\u8350\u79d1\u5ba4\u3002\u5728\u7b2c1\u8f6e\u5bf9\u8bdd\u65f6\uff0c\u56e0\u4e3a\u60a3\u8005\u53ef\u80fd\u4f1a\u4e00\u6b21\u6027\u8f93\u5165\u5168\u90e8\u6216\u8005\u90e8\u5206\u4fe1\u606f\uff0c\u56e0\u6b64\u91c7\u7528&#8221;\u53c2\u6570\u63d0\u53d6\u5668&#8221;\u8282\u70b9\uff0c\u4ece\u60a3\u8005\u9996\u6b21\u8f93\u5165\u4e2d\u63d0\u53d6\u6027\u522b\u3001\u75c7\u72b6\u548c\u5e74\u9f84\u3002\u5e76\u901a\u8fc7&#8221;\u53d8\u91cf\u8d4b\u503c&#8221;\u8282\u70b9\u5c06\u4f1a\u8bdd\u53d8\u91cfis_first_message\u8bbe\u7f6e\u4e3a0\u3002<\/p>\n<h3>3.\u5b58\u5728\u95ee\u98981<\/h3>\n<p>\u5728\u540e\u7eed\u7684\u8f6e\u6b21\u5bf9\u8bdd\u65f6\uff0c\u6bcf\u6b21\u4ec5\u80fd\u8bc6\u522b1\u79cd\u5b57\u6bb5\u4fe1\u606f\uff0c\u5c3d\u7ba1\u60a3\u8005\u53ef\u80fd\u63d0\u4f9b\u591a\u79cd\u5b57\u6bb5\uff0c\u5b57\u6bb5\u8bc6\u522b\u987a\u5e8f\u4e3a\u5e74\u9f84\u3001\u6027\u522b\u3001\u75c7\u72b6\u3002<\/p>\n<p><img decoding=\"async\" title=\"-2\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-15.jpg\" alt=\"-2\" \/><\/p>\n<h3>4.\u5b58\u5728\u95ee\u98982<\/h3>\n<p>\u5982\u679c\u6839\u636e\u60a3\u8005\u4fe1\u606f\u5df2\u7ecf\u63a8\u8350\u8fc7\u79d1\u5ba4\uff0c\u90a3\u4e48\u518d\u6b21\u8f93\u5165\u4efb\u4f55\u4fe1\u606f\u90fd\u4f1a\u63a8\u8350\u4e0a\u6b21\u7684\u79d1\u5ba4\u3002\u56e0\u4e3adepartment\u5b57\u6bb5\u4e0d\u7a7a\uff0c\u8d70\u7684\u76f4\u63a5\u56de\u590d\u6d41\u7a0b\u3002<\/p>\n<p><img decoding=\"async\" title=\"-3\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/fd681a7586fba56.jpg\" alt=\"-3\" \/><\/p>\n<h2>\u4e8c.\u4f1a\u8bdd\u53d8\u91cf<\/h2>\n<p>\u4f1a\u8bdd\u53d8\u91cf\u7528\u4e8e\u5b58\u50a8 LLM \u9700\u8981\u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\uff0c\u5982\u7528\u6237\u504f\u597d\u3001\u5bf9\u8bdd\u5386\u53f2\u7b49\u3002\u5b83\u662f\u53ef\u8bfb\u5199\u7684\u3002\u4f1a\u8bdd\u53d8\u91cf\u9762\u5411\u591a\u8f6e\u5bf9\u8bdd\u573a\u666f\uff0c\u56e0\u6b64\u4f1a\u8bdd\u53d8\u91cf\u4ec5\u9002\u7528\u4e8e Chatflow \u7c7b\u578b\uff08\u804a\u5929\u52a9\u624b -&gt; \u5de5\u4f5c\u6d41\u7f16\u6392\uff09\u5e94\u7528\u3002<\/p>\n<h3>1.<strong>\u4f1a\u8bdd\u53d8\u91cf<\/strong>\u6570\u636e\u7c7b\u578b<\/h3>\n<p>\uff081\uff09String \u5b57\u7b26\u4e32<\/p>\n<p>\uff082\uff09Number \u6570\u503c<\/p>\n<p>\uff083\uff09Object \u5bf9\u8c61<\/p>\n<p>\uff084\uff09Array[string] \u5b57\u7b26\u4e32\u6570\u7ec4<\/p>\n<p>\uff085\uff09Array[number] \u6570\u503c\u6570\u7ec4<\/p>\n<p>\uff086\uff09Array[object] \u5bf9\u8c61\u6570\u7ec4<\/p>\n<h3>2.<strong>\u4f1a\u8bdd\u53d8\u91cf<\/strong>\u7279\u6027<\/h3>\n<p>\uff081\uff09\u4f1a\u8bdd\u53d8\u91cf\u53ef\u5728\u5927\u90e8\u5206\u8282\u70b9\u5185\u5168\u5c40\u5f15\u7528\uff1b<\/p>\n<p>\uff082\uff09\u4f1a\u8bdd\u53d8\u91cf\u7684\u5199\u5165\u9700\u8981\u4f7f\u7528<a href=\"https:\/\/docs.dify.ai\/v\/zh-hans\/guides\/workflow\/node\/variable-assignment\">\u53d8\u91cf\u8d4b\u503c<\/a>\u8282\u70b9\uff1b<\/p>\n<p>\uff083\uff09\u4f1a\u8bdd\u53d8\u91cf\u4e3a\u53ef\u8bfb\u5199\u53d8\u91cf\u3002<\/p>\n<h3>3.\u672c\u5de5\u4f5c\u6d41\u5b9a\u4e49\u7684\u4f1a\u8bdd\u53d8\u91cf<\/h3>\n<p>\u672c\u5de5\u4f5c\u6d41\u5b9a\u4e49\u76845\u4e2a\u4f1a\u8bdd\u53d8\u91cf\uff0c\u5206\u522b\u4e3a\u662f\u5426\u9996\u8f6e\u5bf9\u8bdd\u3001\u5e74\u9f84\u3001\u6027\u522b\u3001\u75c7\u72b6\u548c\u79d1\u5ba4\u3002<\/p>\n<p><img decoding=\"async\" title=\"-4\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-16.jpg\" alt=\"-4\" \/><\/p>\n<h2>\u4e09.\u5de5\u4f5c\u6d41\u76f8\u5173\u63a5\u53e3<\/h2>\n<h3>1.\u83b7\u53d6\u5de5\u4f5c\u6d41\u7684\u63a5\u53e3<\/h3>\n<h4>\uff081\uff09\u6e90\u7801\u4f4d\u7f6e<\/h4>\n<ul>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\api\\controllers\\console\\app\\workflow.py<\/li>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\api\\services\\workflow_service.py<\/li>\n<\/ul>\n<h4>\uff082\uff09\u83b7\u53d6\u5de5\u4f5c\u6d41\u64cd\u4f5c<\/h4>\n<p>http:\/\/localhost:5001\/console\/api\/apps\/3c309371-54f6-4bfb-894a-4193b189ffa5\/workflows\/draft\u3002\u5176\u4e2d\uff0cdraft\u50cf\u8349\u7a3f\u4e00\u6837\uff0c\u8868\u793a\u5728workflow\u9875\u9762\u4e2d\u8fdb\u884c\u8c03\u8bd5\u3002<\/p>\n<p><img decoding=\"async\" title=\"-5\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-18.jpg\" alt=\"-5\" \/><\/p>\n<h4>\uff083\uff09\u83b7\u53d6\u5de5\u4f5c\u6d41\u5b9e\u73b0<\/h4>\n<p>\u5de5\u4f5c\u6d41\u4f1a\u5728workflows\u6570\u636e\u8868\u4e2d\u5b58\u50a8\u4e00\u6761\u8bb0\u5f55\u3002\u73b0\u5728\u7684version\u4e3adraft\uff0c\u6bcf\u53d1\u5e03\u4e00\u6b21\u5de5\u4f5c\u6d41\uff0c\u5c31\u4f1a\u5728\u8be5\u8868\u4e2d\u63d2\u5165\u4e00\u6761\u8bb0\u5f55\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" title=\"-6\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-19.jpg\" alt=\"-6\" \/><\/p>\n<h4>\uff084\uff09Workflow\u6570\u636e\u7ed3\u6784<\/h4>\n<p>\u63a5\u53e3\u8fd4\u56de\u7684Workflow\u6570\u636e\u7ed3\u6784\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code>class Workflow(db.Model):\r\n__tablename__ = 'workflows'\r\n__table_args__ = (\r\ndb.PrimaryKeyConstraint('id', name='workflow_pkey'),\r\ndb.Index('workflow_version_idx', 'tenant_id', 'app_id', 'version'),\r\n)\r\nid: Mapped[str] = db.Column(StringUUID, server_default=db.text('uuid_generate_v4()'))\r\ntenant_id: Mapped[str] = db.Column(StringUUID, nullable=False)\r\napp_id: Mapped[str] = db.Column(StringUUID, nullable=False)\r\ntype: Mapped[str] = db.Column(db.String(255), nullable=False)\r\nversion: Mapped[str] = db.Column(db.String(255), nullable=False)\r\ngraph: Mapped[str] = db.Column(db.Text)\r\nfeatures: Mapped[str] = db.Column(db.Text)\r\ncreated_by: Mapped[str] = db.Column(StringUUID, nullable=False)\r\ncreated_at: Mapped[datetime] = db.Column(db.DateTime, nullable=False, server_default=db.text('CURRENT_TIMESTAMP(0)'))\r\nupdated_by: Mapped[str] = db.Column(StringUUID)\r\nupdated_at: Mapped[datetime] = db.Column(db.DateTime)\r\n_environment_variables: Mapped[str] = db.Column('environment_variables', db.Text, nullable=False, server_default='{}')\r\n_conversation_variables: Mapped[str] = db.Column('conversation_variables', db.Text, nullable=False, server_default='{}')\r\n<\/code><\/pre>\n<h3>2.\u66f4\u65b0\u5de5\u4f5c\u6d41\u7684\u63a5\u53e3<\/h3>\n<h4>\uff081\uff09\u6e90\u7801\u4f4d\u7f6e<\/h4>\n<ul>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\web\\app\\components\\workflow\\hooks\\use-nodes-sync-draft.ts<\/li>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\web\\service\\workflow.ts<\/li>\n<\/ul>\n<h4>\uff082\uff09\u66f4\u65b0\u5de5\u4f5c\u6d41\u64cd\u4f5c<\/h4>\n<p>http:\/\/localhost:5001\/console\/api\/apps\/3c309371-54f6-4bfb-894a-4193b189ffa5\/workflows\/draft\u3002<\/p>\n<p><img decoding=\"async\" title=\"-7\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-21.jpg\" alt=\"-7\" \/><\/p>\n<h4>\uff083\uff09\u66f4\u65b0\u5de5\u4f5c\u6d41\u524d\u7aef\u4ee3\u7801<\/h4>\n<p>\u7531\u4e8eDify\u5de5\u4f5c\u6d41\u524d\u7aef\u4f7f\u7528\u7684React Flow\u6846\u67b6\uff0c\u63a8\u6d4b\u53ef\u80fd\u662f\u5f53workflow\u53d1\u751f\u53d8\u5316\u65f6\u8fdb\u884cPOST\u64cd\u4f5c\uff0c\u6bd4\u5982\u589e\u5220\u6539\u7b49\u64cd\u4f5c\u3002\u901a\u8fc7\u540e\u7aefConsole\u4e2d\u7684\u65e5\u5fd7\u53d1\u73b0\u8c03\u7528\u4e86<code>workflows\/draft?_token=<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" title=\"-8\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-20.jpg\" alt=\"-8\" \/><\/p>\n<p>\u901a\u8fc7<code>workflows\/draft?_token=<\/code>\u5728\u524d\u7aef\u4ee3\u7801\u4e2d\u641c\u7d22\u4ec5\u53d1\u73b0\u4e86\u4e00\u4e2a\u5730\u65b9\u4f7f\u7528\uff0c\u90a3\u80af\u5b9a\u5c31\u662f\u8fd9\u91cc\u4e86\u3002<\/p>\n<p><img decoding=\"async\" title=\"-9\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-22.jpg\" alt=\"-9\" \/><\/p>\n<p>\u7531\u4e8e\u6267\u884cPOST\u64cd\u4f5c\uff0c\u80af\u5b9a\u8981\u6709Payload\u53c2\u6570\u5427\uff0c\u5728\u8be5\u6587\u4ef6\u4e2d\u53d1\u73b0\u4e86workflow\u53c2\u6570\u3002<\/p>\n<p><img decoding=\"async\" title=\"-10\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-23.jpg\" alt=\"-10\" \/><\/p>\n<p>\u5f53\u4f9d\u8d56\u9879<code>getPostParams<\/code>\u53d1\u751f\u53d8\u5316\u65f6\uff0c\u4f1a\u5f02\u6b65\u6267\u884c<code>syncWorkflowDraft(postParams)<\/code>\u3002<\/p>\n<p><img decoding=\"async\" title=\"-11\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-24.jpg\" alt=\"-11\" \/><\/p>\n<p>\u800c<code>syncWorkflowDraft(postParams)<\/code>\u5b9e\u9645\u8c03\u7528\u4e3aPOST\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" title=\"-12\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-25.jpg\" alt=\"-12\" \/><\/p>\n<h4>\uff084\uff09\u5de5\u4f5c\u6d41\u51fd\u6570\u603b\u7ed3<\/h4>\n<p>\u5bf9<code>dify-0.7.2\\web\\service\\workflow.ts<\/code>\u4e2d\u7684\u51fd\u6570\u8fdb\u884c\u603b\u7ed3\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5e8f\u53f7<\/th>\n<th>\u51fd\u6570\u540d\u79f0<\/th>\n<th>\u51fd\u6570\u529f\u80fd<\/th>\n<th>\u53c2\u6570\u53ca\u89e3\u91ca<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td><code>fetchWorkflowDraft<\/code><\/td>\n<td>\u83b7\u53d6\u5de5\u4f5c\u6d41\u8349\u7a3f\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td><code>syncWorkflowDraft<\/code><\/td>\n<td>\u540c\u6b65\u5de5\u4f5c\u6d41\u8349\u7a3f\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<code>params<\/code>\uff1a\u5bf9\u8c61\uff0c\u8bf7\u6c42\u7684\u53c2\u6570\uff0c\u5305\u542b\u00a0<code>graph<\/code>\u3001<code>features<\/code>\u3001<code>environment_variables<\/code>\u00a0\u548c\u00a0<code>conversation_variables<\/code>\u3002<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td><code>fetchNodesDefaultConfigs<\/code><\/td>\n<td>\u83b7\u53d6\u8282\u70b9\u7684\u9ed8\u8ba4\u914d\u7f6e\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td><code>fetchWorkflowRunHistory<\/code><\/td>\n<td>\u83b7\u53d6\u5de5\u4f5c\u6d41\u8fd0\u884c\u5386\u53f2\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td><code>fetcChatRunHistory<\/code><\/td>\n<td>\u83b7\u53d6\u804a\u5929\u8fd0\u884c\u5386\u53f2\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td><code>singleNodeRun<\/code><\/td>\n<td>\u8fd0\u884c\u5355\u4e2a\u8282\u70b9\u3002<\/td>\n<td><code>appId<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u5e94\u7528\u7684 ID\u3002<code>nodeId<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8282\u70b9\u7684 ID\u3002<code>params<\/code>\uff1a\u5bf9\u8c61\uff0c\u8bf7\u6c42\u7684\u53c2\u6570\u3002<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td><code>getIterationSingleNodeRunUrl<\/code><\/td>\n<td>\u83b7\u53d6\u5355\u4e2a\u8282\u70b9\u8fd0\u884c\u7684\u8fed\u4ee3 URL\u3002<\/td>\n<td><code>isChatFlow<\/code>\uff1a\u5e03\u5c14\u503c\uff0c\u6307\u793a\u662f\u5426\u4e3a\u804a\u5929\u6d41\u3002<code>appId<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u5e94\u7528\u7684 ID\u3002<code>nodeId<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8282\u70b9\u7684 ID\u3002<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td><code>publishWorkflow<\/code><\/td>\n<td>\u53d1\u5e03\u5de5\u4f5c\u6d41\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td><code>fetchPublishedWorkflow<\/code><\/td>\n<td>\u83b7\u53d6\u5df2\u53d1\u5e03\u7684\u5de5\u4f5c\u6d41\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td><code>stopWorkflowRun<\/code><\/td>\n<td>\u505c\u6b62\u5de5\u4f5c\u6d41\u8fd0\u884c\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td><code>fetchNodeDefault<\/code><\/td>\n<td>\u83b7\u53d6\u8282\u70b9\u7684\u9ed8\u8ba4\u914d\u7f6e\u3002<\/td>\n<td><code>appId<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u5e94\u7528\u7684 ID\u3002<code>blockType<\/code>\uff1a\u679a\u4e3e\u503c\uff0c\u8282\u70b9\u7684\u7c7b\u578b\u3002<code>query<\/code>\uff1a\u5bf9\u8c61\uff0c\u53ef\u9009\uff0c\u67e5\u8be2\u53c2\u6570\u3002<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td><code>updateWorkflowDraftFromDSL<\/code><\/td>\n<td>\u4ece DSL \u66f4\u65b0\u5de5\u4f5c\u6d41\u8349\u7a3f\u3002<\/td>\n<td><code>appId<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u5e94\u7528\u7684 ID\u3002<code>data<\/code>\uff1a\u5b57\u7b26\u4e32\uff0cDSL \u6570\u636e\u3002<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td><code>fetchCurrentValueOfConversationVariable<\/code><\/td>\n<td>\u83b7\u53d6\u4f1a\u8bdd\u53d8\u91cf\u7684\u5f53\u524d\u503c\u3002<\/td>\n<td><code>url<\/code>\uff1a\u5b57\u7b26\u4e32\uff0c\u8bf7\u6c42\u7684 URL\u3002<code>params<\/code>\uff1a\u5bf9\u8c61\uff0c\u8bf7\u6c42\u7684\u53c2\u6570\uff0c\u5305\u542b\u00a0<code>conversation_id<\/code>\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>3.\u5de5\u4f5c\u6d41\u7684\u6267\u884c<\/h3>\n<p>\u53c2\u8003\u300a<a href=\"https:\/\/z0yrmerhgi8.feishu.cn\/wiki\/FFzxwdF4PijlhjkLUoecOv6Vn8a\">Chatflow\u521b\u5efa\u3001\u66f4\u65b0\u3001\u6267\u884c\u548c\u5220\u9664\u64cd\u4f5c\u7684\u8fc7\u7a0b\u5b9e\u73b0<\/a>\u300b\u4e2d&#8221;Chatflow\u7684\u6267\u884c&#8221;\u90e8\u5206[6]\u3002<\/p>\n<h3>4.\u5de5\u4f5c\u6d41\u7684\u53d1\u5e03<\/h3>\n<h4>\uff081\uff09\u6e90\u7801\u4f4d\u7f6e<\/h4>\n<ul>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\api\\controllers\\console\\app\\workflow.py<\/li>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\api\\services\\workflow_service.py<\/li>\n<li>\u6e90\u7801\u4f4d\u7f6e\uff1adify-0.7.2\\api\\events\\event_handlers\\update_app_dataset_join_when_app_published_workflow_updated.py<\/li>\n<\/ul>\n<h4>\uff082\uff09\u5de5\u4f5c\u6d41\u53d1\u5e03\u63a5\u53e3<\/h4>\n<p>\u70b9\u51fb\u53d1\u5e03\u5de5\u4f5c\u6d41\u65f6\u5c31\u4f1a\u6267\u884c<code>http:\/\/localhost:5001\/console\/api\/apps\/3c309371-54f6-4bfb-894a-4193b189ffa5\/workflows\/publish<\/code>\u63a5\u53e3\u3002<\/p>\n<p><img decoding=\"async\" title=\"-13\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-26.jpg\" alt=\"-13\" \/><\/p>\n<p>\u4e3b\u8981\u5305\u62ec\u521b\u5efa\u4e00\u4e2a\u65b0\u7684workflow\uff0c\u4ee5\u53ca\u89e6\u53d1app workflow\u4e8b\u4ef6\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" title=\"-14\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-27.jpg\" alt=\"-14\" \/><\/p>\n<h4>\uff083\uff09\u521b\u5efa\u65b0\u7684workflow\u8bb0\u5f55<\/h4>\n<p>\u4e3b\u8981\u5305\u62ec\u521b\u5efa\u4e00\u6761\u65b0\u7684workflow\u8bb0\u5f55\uff0c\u5176\u4e2dversion\u5b57\u6bb5\u5185\u5bb9\u4e3a2024-09-07 09:11:25.894535\u3002\u8868\u793a\u5df2\u7ecf\u53d1\u5e03\u7684workflow\uff0c\u800c\u4e0d\u662fdraft\uff08workflow\u6ca1\u6709\u53d1\u5e03\uff0c\u8fd8\u5728workflow\u753b\u5e03\u4e2d\u8c03\u8bd5\uff09\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" title=\"-15\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/17c531b9e30738d-28.jpg\" alt=\"-15\" \/><\/p>\n<h4>\uff084\uff09app_published_workflow_was_updated\u4e8b\u4ef6\u5b9e\u73b0<\/h4>\n<pre><code>@app_published_workflow_was_updated.connect\r\ndef handle(sender, **kwargs):\r\napp = sender\r\npublished_workflow = kwargs.get(\"published_workflow\")\r\npublished_workflow = cast(<a href=\"https:\/\/www.kdjingpai.com\/workflow\/\">Workflow<\/a>, published_workflow)\r\ndataset_ids = get_dataset_ids_from_workflow(published_workflow)  # \u4ece\u5de5\u4f5c\u6d41\u4e2d\u83b7\u53d6\u6570\u636e\u96c6ID\r\napp_dataset_joins = db.session.query(AppDatasetJoin).filter(AppDatasetJoin.app_id == app.id).all()  # \u83b7\u53d6\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\nremoved_dataset_ids = []  # \u7528\u4e8e\u5b58\u50a8\u79fb\u9664\u7684\u6570\u636e\u96c6ID\r\nif not app_dataset_joins:  # \u5982\u679c\u6ca1\u6709\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\nadded_dataset_ids = dataset_ids  # \u6dfb\u52a0\u6570\u636e\u96c6ID\r\nelse:  # \u5982\u679c\u6709\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\nold_dataset_ids = set()  # \u7528\u4e8e\u5b58\u50a8\u65e7\u7684\u6570\u636e\u96c6ID\r\nfor app_dataset_join in app_dataset_joins:  # \u904d\u5386\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\nold_dataset_ids.add(app_dataset_join.dataset_id)  # \u6dfb\u52a0\u6570\u636e\u96c6ID\r\nadded_dataset_ids = dataset_ids - old_dataset_ids  # \u6dfb\u52a0\u6570\u636e\u96c6ID\r\nremoved_dataset_ids = old_dataset_ids - dataset_ids  # \u79fb\u9664\u6570\u636e\u96c6ID\r\nif removed_dataset_ids:  # \u5982\u679c\u6709\u79fb\u9664\u7684\u6570\u636e\u96c6ID\r\nfor dataset_id in removed_dataset_ids:  # \u904d\u5386\u79fb\u9664\u7684\u6570\u636e\u96c6ID\r\ndb.session.query(AppDatasetJoin).filter(\r\nAppDatasetJoin.app_id == app.id, AppDatasetJoin.dataset_id == dataset_id\r\n).delete()  # \u5220\u9664\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\nif added_dataset_ids:  # \u5982\u679c\u6709\u6dfb\u52a0\u7684\u6570\u636e\u96c6ID\r\nfor dataset_id in added_dataset_ids:  # \u904d\u5386\u6dfb\u52a0\u7684\u6570\u636e\u96c6ID\r\napp_dataset_join = AppDatasetJoin(app_id=app.id, dataset_id=dataset_id)  # \u521b\u5efa\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\ndb.session.add(app_dataset_join)  # \u6dfb\u52a0\u5e94\u7528\u6570\u636e\u96c6\u5173\u8054\r\ndb.session.commit()  # \u63d0\u4ea4\u4e8b\u52a1\r\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u7684\u529f\u80fd\u662f\u5904\u7406\u00a0<code>app_published_workflow_was_updated<\/code>\u00a0\u4fe1\u53f7\uff0c\u5f53\u67d0\u4e2a\u5e94\u7528\u7684\u5df2\u53d1\u5e03\u5de5\u4f5c\u6d41\u66f4\u65b0\u65f6\uff0c\u66f4\u65b0\u5e94\u7528\u4e0e\u6570\u636e\u96c6\u7684\u5173\u8054\u5173\u7cfb\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u83b7\u53d6\u53d1\u9001\u4fe1\u53f7\u7684\u5e94\u7528\u5bf9\u8c61\u00a0<code>app<\/code>\u00a0\u548c\u66f4\u65b0\u540e\u7684\u5de5\u4f5c\u6d41\u5bf9\u8c61\u00a0<code>published_workflow<\/code>\u3002<\/li>\n<li>\u8c03\u7528\u00a0<code>get_dataset_ids_from_workflow<\/code>\u00a0\u51fd\u6570\uff0c\u4ece\u66f4\u65b0\u540e\u7684\u5de5\u4f5c\u6d41\u4e2d\u63d0\u53d6\u6570\u636e\u96c6 ID \u96c6\u5408\u00a0<code>dataset_ids<\/code>\u3002<\/li>\n<li>\u67e5\u8be2\u6570\u636e\u5e93\uff0c\u83b7\u53d6\u5f53\u524d\u5e94\u7528\u7684\u6240\u6709\u00a0<code>AppDatasetJoin<\/code>\u00a0\u8bb0\u5f55\u3002<\/li>\n<li>\u8ba1\u7b97\u9700\u8981\u6dfb\u52a0\u548c\u5220\u9664\u7684\u6570\u636e\u96c6 ID\uff1a\n<ul>\n<li>\u5982\u679c\u5f53\u524d\u6ca1\u6709\u4efb\u4f55\u00a0<code>AppDatasetJoin<\/code>\u00a0\u8bb0\u5f55\uff0c\u5219\u6240\u6709\u63d0\u53d6\u7684\u6570\u636e\u96c6 ID \u90fd\u9700\u8981\u6dfb\u52a0\u3002<\/li>\n<li>\u5426\u5219\uff0c\u8ba1\u7b97\u9700\u8981\u6dfb\u52a0\u548c\u5220\u9664\u7684\u6570\u636e\u96c6 ID\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u5220\u9664\u9700\u8981\u79fb\u9664\u7684\u00a0<code>AppDatasetJoin<\/code>\u00a0\u8bb0\u5f55\u3002<\/li>\n<li>\u6dfb\u52a0\u65b0\u7684\u00a0<code>AppDatasetJoin<\/code>\u00a0\u8bb0\u5f55\u3002<\/li>\n<li>\u63d0\u4ea4\u6570\u636e\u5e93\u4e8b\u52a1\u3002<\/li>\n<\/ul>\n<h4>\uff085\uff09AppDatasetJoin\u8868\u7684\u4f5c\u7528<\/h4>\n<p>AppDatasetJoin \u8868\u7684\u4f5c\u7528\u662f\u7ef4\u62a4\u5e94\u7528\u7a0b\u5e8f (App) \u548c\u6570\u636e\u96c6 (Dataset) \u4e4b\u95f4\u7684\u591a\u5bf9\u591a\u5173\u7cfb\u3002\u6bcf\u6761\u8bb0\u5f55\u8868\u793a\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e0e\u4e00\u4e2a\u6570\u636e\u96c6\u7684\u5173\u8054\u3002\u5177\u4f53\u5b57\u6bb5\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>id: \u4e3b\u952e\uff0c\u552f\u4e00\u6807\u8bc6\u4e00\u6761\u8bb0\u5f55\u3002<\/li>\n<li>app_id: \u5e94\u7528\u7a0b\u5e8f\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002<\/li>\n<li>dataset_id: \u6570\u636e\u96c6\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002<\/li>\n<li>created_at: \u8bb0\u5f55\u521b\u5efa\u7684\u65f6\u95f4\u6233\u3002<\/li>\n<li>\u901a\u8fc7\u8fd9\u4e2a\u8868\uff0c\u53ef\u4ee5\u67e5\u8be2\u67d0\u4e2a\u5e94\u7528\u7a0b\u5e8f\u5173\u8054\u4e86\u54ea\u4e9b\u6570\u636e\u96c6\uff0c\u6216\u8005\u67d0\u4e2a\u6570\u636e\u96c6\u88ab\u54ea\u4e9b\u5e94\u7528\u7a0b\u5e8f\u5173\u8054\u3002<\/li>\n<\/ul>\n<h4>\uff086\uff09get_dataset_ids_from_workflow()\u5b9e\u73b0<\/h4>\n<pre><code>def get_dataset_ids_from_workflow(published_workflow: Workflow) -&gt; set:  # \u4ece\u5de5\u4f5c\u6d41\u4e2d\u83b7\u53d6\u6570\u636e\u96c6ID\r\ndataset_ids = set()  # \u7528\u4e8e\u5b58\u50a8\u6570\u636e\u96c6ID\r\ngraph = published_workflow.graph_dict  # \u83b7\u53d6\u5de5\u4f5c\u6d41\u56fe\r\nif not graph:  # \u5982\u679c\u6ca1\u6709\u56fe\r\nreturn dataset_ids  # \u8fd4\u56de\u7a7a\u96c6\u5408\r\nnodes = graph.get(\"nodes\", [])  # \u83b7\u53d6\u56fe\u4e2d\u7684\u8282\u70b9\r\n# fetch all knowledge <a href=\"https:\/\/www.kdjingpai.com\/retrieval\/\">retrieval<\/a> nodes  # \u83b7\u53d6\u6240\u6709\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\r\nknowledge_retrieval_nodes = [\r\nnode for node in nodes if node.get(\"data\", {}).get(\"type\") == NodeType.KNOWLEDGE_RETRIEVAL.value\r\n]  # \u83b7\u53d6\u6240\u6709\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\r\nif not knowledge_retrieval_nodes:  # \u5982\u679c\u6ca1\u6709\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\r\nreturn dataset_ids  # \u8fd4\u56de\u7a7a\u96c6\u5408\r\nfor node in knowledge_retrieval_nodes:  # \u904d\u5386\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\r\ntry:\r\nnode_data = KnowledgeRetrievalNodeData(**node.get(\"data\", {}))  # \u83b7\u53d6\u8282\u70b9\u6570\u636e\r\ndataset_ids.update(node_data.dataset_ids)  # \u66f4\u65b0\u6570\u636e\u96c6ID\r\nexcept Exception as e:  # \u5982\u679c\u51fa\u73b0\u5f02\u5e38\r\n<a href=\"https:\/\/www.kdjingpai.com\/continue\/\">continue<\/a>\r\nreturn dataset_ids\r\n<\/code><\/pre>\n<p>\u5176\u4e2d\uff0cget_dataset_ids_from_workflow \u51fd\u6570\u7684\u4e3b\u8981\u529f\u80fd\u662f\u4ece\u7ed9\u5b9a\u7684\u5de5\u4f5c\u6d41\u5bf9\u8c61\u4e2d\u63d0\u53d6\u6240\u6709\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\u7684\u76f8\u5173\u6570\u636e\u96c6 ID\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u521d\u59cb\u5316\u4e00\u4e2a\u7a7a\u7684 dataset_ids \u96c6\u5408\uff0c\u7528\u4e8e\u5b58\u50a8\u6570\u636e\u96c6 ID\u3002<\/li>\n<li>\u83b7\u53d6\u5de5\u4f5c\u6d41\u7684\u56fe\u7ed3\u6784 graph\u3002<\/li>\n<li>\u5982\u679c\u56fe\u7ed3\u6784\u4e3a\u7a7a\uff0c\u8fd4\u56de\u7a7a\u7684 dataset_ids \u96c6\u5408\u3002<\/li>\n<li>\u83b7\u53d6\u56fe\u4e2d\u7684\u6240\u6709\u8282\u70b9 nodes\u3002<\/li>\n<li>\u7b5b\u9009\u51fa\u6240\u6709\u7c7b\u578b\u4e3a KNOWLEDGE_RETRIEVAL \u7684\u8282\u70b9 knowledge_retrieval_nodes\u3002<\/li>\n<li>\u904d\u5386\u8fd9\u4e9b\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\uff0c\u63d0\u53d6\u5176\u6570\u636e\u96c6 ID \u5e76\u66f4\u65b0\u5230 dataset_ids \u96c6\u5408\u4e2d\u3002<\/li>\n<li>\u8fd4\u56de\u5305\u542b\u6240\u6709\u63d0\u53d6\u7684\u6570\u636e\u96c6 ID \u7684\u96c6\u5408\u3002<\/li>\n<\/ul>\n<h3>5.\u5de5\u4f5c\u6d41\u5176\u5b83\u63a5\u53e3<\/h3>\n<p>\u8fd9\u90e8\u5206\u63a5\u53e3\u4e0d\u518d\u9610\u8ff0\uff0c\u5de5\u4f5c\u6d41\u7f16\u6392\u5bf9\u8bdd\u578b\u5e94\u7528API\u5df2\u7ecf\u63cf\u8ff0\u7684\u975e\u5e38\u6e05\u6670\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5e8f\u53f7<\/th>\n<th>\u63a5\u53e3\u540d\u79f0<\/th>\n<th>\u63a5\u53e3\u94fe\u63a5<\/th>\n<th>\u63a5\u53e3\u529f\u80fd\u89e3\u91ca<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>\u53d1\u9001\u5bf9\u8bdd\u6d88\u606f<\/td>\n<td>POST \/chat-messages<\/td>\n<td>\u521b\u5efa\u4f1a\u8bdd\u6d88\u606f\uff0c\u53d1\u9001\u7528\u6237\u8f93\u5165\u6216\u63d0\u95ee\u5185\u5bb9\u3002<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u4e0a\u4f20\u6587\u4ef6<\/td>\n<td>POST \/files\/upload<\/td>\n<td>\u4e0a\u4f20\u6587\u4ef6\uff08\u76ee\u524d\u4ec5\u652f\u6301\u56fe\u7247\uff09\u4ee5\u4fbf\u5728\u53d1\u9001\u6d88\u606f\u65f6\u4f7f\u7528\u3002<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u505c\u6b62\u54cd\u5e94<\/td>\n<td>POST \/chat-messages\/:task_id\/stop<\/td>\n<td>\u505c\u6b62\u6d41\u5f0f\u54cd\u5e94\uff08\u4ec5\u652f\u6301\u6d41\u5f0f\u6a21\u5f0f\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u6d88\u606f\u53cd\u9988\uff08\u70b9\u8d5e\uff09<\/td>\n<td>POST \/messages\/:message_id\/feedbacks<\/td>\n<td>\u5bf9\u6d88\u606f\u8fdb\u884c\u7528\u6237\u53cd\u9988\u3001\u70b9\u8d5e\uff0c\u65b9\u4fbf\u4f18\u5316\u8f93\u51fa\u7ed3\u679c\u3002<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\u83b7\u53d6\u4e0b\u4e00\u8f6e\u5efa\u8bae\u95ee\u9898\u5217\u8868<\/td>\n<td>GET \/messages\/{message_id}\/suggested<\/td>\n<td>\u83b7\u53d6\u4e0b\u4e00\u8f6e\u5efa\u8bae\u7684\u95ee\u9898\u5217\u8868\u3002<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>\u83b7\u53d6\u4f1a\u8bdd\u5386\u53f2\u6d88\u606f<\/td>\n<td>GET \/messages<\/td>\n<td>\u83b7\u53d6\u4f1a\u8bdd\u7684\u5386\u53f2\u6d88\u606f\u8bb0\u5f55\u3002<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>\u83b7\u53d6\u4f1a\u8bdd\u5217\u8868<\/td>\n<td>GET \/conversations<\/td>\n<td>\u83b7\u53d6\u5f53\u524d\u7528\u6237\u7684\u4f1a\u8bdd\u5217\u8868\u3002<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>\u5220\u9664\u4f1a\u8bdd<\/td>\n<td>DELETE \/conversations\/:conversation_id<\/td>\n<td>\u5220\u9664\u6307\u5b9a\u7684\u4f1a\u8bdd\u3002<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>\u4f1a\u8bdd\u91cd\u547d\u540d<\/td>\n<td>POST \/conversations\/:conversation_id\/name<\/td>\n<td>\u5bf9\u4f1a\u8bdd\u8fdb\u884c\u91cd\u547d\u540d\u3002<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>\u8bed\u97f3\u8f6c\u6587\u5b57<\/td>\n<td>POST \/audio-to-text<\/td>\n<td>\u5c06\u8bed\u97f3\u6587\u4ef6\u8f6c\u6362\u4e3a\u6587\u5b57\u3002<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>\u6587\u5b57\u8f6c\u8bed\u97f3<\/td>\n<td>POST \/text-to-audio<\/td>\n<td>\u5c06\u6587\u5b57\u8f6c\u6362\u4e3a\u8bed\u97f3\u3002<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>\u83b7\u53d6\u5e94\u7528\u914d\u7f6e\u4fe1\u606f<\/td>\n<td>GET \/parameters<\/td>\n<td>\u83b7\u53d6\u5e94\u7528\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u5982\u529f\u80fd\u5f00\u5173\u3001\u8f93\u5165\u53c2\u6570\u7b49\u3002<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td>\u83b7\u53d6\u5e94\u7528Meta\u4fe1\u606f<\/td>\n<td>GET \/meta<\/td>\n<td>\u83b7\u53d6\u5e94\u7528\u7684 Meta \u4fe1\u606f\uff0c\u7528\u4e8e\u83b7\u53d6\u5de5\u5177\u56fe\u6807\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u53c2\u8003\u6587\u732e<\/h2>\n<p>[1] \u4f1a\u8bdd\u53d8\u91cf\uff1ahttps:\/\/docs.dify.ai\/v\/zh-hans\/guides\/workflow\/variables<\/p>\n<p>[2] \u53d8\u91cf\u8d4b\u503c\uff1ahttps:\/\/docs.dify.ai\/v\/zh-hans\/guides\/workflow\/node\/variable-assignment<\/p>\n<p>[3] \u53d8\u91cf\u805a\u5408\uff1ahttps:\/\/docs.dify.ai\/v\/zh-hans\/guides\/workflow\/node\/variable-assigner<\/p>\n<p>[4] <a href=\"https:\/\/www.kdjingpai.com\/react\/\">React<\/a> Flow\u4e2d\u6587\u7f51\uff1ahttps:\/\/reactflow-cn.js.org\/<\/p>\n<p>[5] React Flow\u82f1\u6587\u7f51\uff1ahttps:\/\/reactflow.dev\/<\/p>\n<p>[6] Chatflow\u521b\u5efa\u3001\u66f4\u65b0\u3001\u6267\u884c\u548c\u5220\u9664\u64cd\u4f5c\u7684\u8fc7\u7a0b\u5b9e\u73b0\uff1ahttps:\/\/z0yrmerhgi8.feishu.cn\/wiki\/FFzxwdF4PijlhjkLUoecOv6Vn8a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u89e3\uff1a\u672c\u6587\u4f7f\u7528Dify v0.7.2\u7248\u672c\u3002 \u6b64\u804a\u5929\u6d41\u7a0b\u5c55\u793a\u4e86\u5982\u4f55\u6784\u5efa\u4e00\u4e2a\u7528\u4e8e\u95e8\u8bca\u5bfc\u8bca\u7684\u804a\u5929\u673a\u5668\u4eba\uff0c\u53ef\u901a\u8fc7\u7f51\u9875\u6216\u8bed\u97f3\u5bf9\u8bdd\u6765\u6536\u96c6\u75c5\u4eba\u7684\u6570\u636e\u3002\u7b80\u5355\u7406\u89e3\uff0c\u5373\u6839\u636e\u60a3\u8005\u4fe1\u606f\uff08\u5e74\u9f84\u3001\u6027\u522b\u548c\u75c7\u72b6\uff09\uff0c\u7ed9\u60a3\u8005\u63a8\u8350\u79d1\u5ba4\u3002 \u4e00.\u5de5\u4f5c\u6d41\u601d\u8def 1.\u5de5\u4f5c\u6d41\u622a\u56fe \u95e8\u8bca\u5bfc\u8bca&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182],"tags":[],"class_list":["post-15061","post","type-post","status-publish","format-standard","hentry","category-shicao"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/15061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/comments?post=15061"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/15061\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media?parent=15061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/categories?post=15061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/tags?post=15061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}