{"id":55819,"date":"2025-02-19T14:52:54","date_gmt":"2025-02-19T06:52:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/55819\/"},"modified":"2025-02-19T14:52:54","modified_gmt":"2025-02-19T06:52:54","slug":"dify%e5%b7%a5%e4%bd%9c%e6%b5%81%e4%b8%ad%e7%9a%84%e5%8f%98%e9%87%8f%e8%81%9a%e5%90%88%e5%92%8c%e5%8f%98%e9%87%8f%e8%b5%8b%e5%80%bc%e8%8a%82%e7%82%b9","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/55819\/","title":{"rendered":"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9"},"content":{"rendered":"<h2>\u53d8\u91cf\u805a\u5408<\/h2>\n<h3>\u5b9a\u4e49<\/h3>\n<p>\u5c06\u591a\u8def\u5206\u652f\u7684\u53d8\u91cf\u805a\u5408\u4e3a\u4e00\u4e2a\u53d8\u91cf\uff0c\u4ee5\u5b9e\u73b0\u4e0b\u6e38\u8282\u70b9\u7edf\u4e00\u914d\u7f6e\u3002<\/p>\n<p>\u53d8\u91cf\u805a\u5408\u8282\u70b9\uff08\u539f\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\uff09\u662f\u5de5\u4f5c\u6d41\u7a0b\u4e2d\u7684\u4e00\u4e2a\u5173\u952e\u8282\u70b9\uff0c\u5b83\u8d1f\u8d23\u6574\u5408\u4e0d\u540c\u5206\u652f\u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u786e\u4fdd\u65e0\u8bba\u54ea\u4e2a\u5206\u652f\u88ab\u6267\u884c\uff0c\u5176\u7ed3\u679c\u90fd\u80fd\u901a\u8fc7\u4e00\u4e2a\u7edf\u4e00\u7684\u53d8\u91cf\u6765\u5f15\u7528\u548c\u8bbf\u95ee\u3002\u8fd9\u5728\u591a\u5206\u652f\u7684\u60c5\u51b5\u4e0b\u975e\u5e38\u6709\u7528\uff0c\u53ef\u5c06\u4e0d\u540c\u5206\u652f\u4e0b\u76f8\u540c\u4f5c\u7528\u7684\u53d8\u91cf\u6620\u5c04\u4e3a\u4e00\u4e2a\u8f93\u51fa\u53d8\u91cf\uff0c\u907f\u514d\u4e0b\u6e38\u8282\u70b9\u91cd\u590d\u5b9a\u4e49\u3002<\/p>\n<h3>\u573a\u666f<\/h3>\n<p>\u901a\u8fc7\u53d8\u91cf\u805a\u5408\uff0c\u53ef\u4ee5\u5c06\u8bf8\u5982\u95ee\u9898\u5206\u7c7b\u6216\u6761\u4ef6\u5206\u652f\u7b49\u591a\u8def\u8f93\u51fa\u805a\u5408\u4e3a\u5355\u8def\uff0c\u4f9b\u6d41\u7a0b\u4e0b\u6e38\u7684\u8282\u70b9\u4f7f\u7528\u548c\u64cd\u4f5c\uff0c\u7b80\u5316\u4e86\u6570\u636e\u6d41\u7684\u7ba1\u7406\u3002<\/p>\n<p> <\/p>\n<p><strong>\u95ee\u9898\u5206\u7c7b\u540e\u7684\u591a\u8def\u805a\u5408<\/strong><\/p>\n<p>\u672a\u6dfb\u52a0\u53d8\u91cf\u805a\u5408\uff0c\u5206\u7c7b1 \u548c \u5206\u7c7b 2 \u5206\u652f\u7ecf\u4e0d\u540c\u7684\u77e5\u8bc6\u5e93\u68c0\u7d22\u540e\u9700\u8981\u91cd\u590d\u5b9a\u4e49\u4e0b\u6e38\u7684 LLM \u548c\u76f4\u63a5\u56de\u590d\u8282\u70b9\u3002<\/p>\n<dl>\n<dt>\n  <img decoding=\"async\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%200%200'%3E%3C\/svg%3E\" class=\"aligncenter\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe\" \/><br \/>\n  <img decoding=\"async\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/685b2d7dd8bcf45.jpg\" class=\"aligncenter\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe1\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe1\" \/>\n <\/dt>\n<dd>\n   \u95ee\u9898\u5206\u7c7b\uff08\u65e0\u53d8\u91cf\u805a\u5408\uff09\n <\/dd>\n<\/dl>\n<p>&nbsp;<\/p>\n<p>\u6dfb\u52a0\u53d8\u91cf\u805a\u5408\uff0c\u53ef\u4ee5\u5c06\u4e24\u4e2a\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\u7684\u8f93\u51fa\u805a\u5408\u4e3a\u4e00\u4e2a\u53d8\u91cf\u3002<\/p>\n<dl>\n<dt>\n  <img decoding=\"async\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%200%200'%3E%3C\/svg%3E\" class=\"aligncenter\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe\" \/><br \/>\n  <img decoding=\"async\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/552857cf20d8e22.jpg\" class=\"aligncenter\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe2\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe2\" \/>\n <\/dt>\n<dd>\n   \u95ee\u9898\u5206\u7c7b\u540e\u7684\u591a\u8def\u805a\u5408\n <\/dd>\n<\/dl>\n<p>&nbsp;<\/p>\n<p><strong>IF\/ELSE \u6761\u4ef6\u5206\u652f\u540e\u7684\u591a\u8def\u805a\u5408<\/strong><\/p>\n<dl>\n<dt>\n  <img decoding=\"async\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%200%200'%3E%3C\/svg%3E\" class=\"aligncenter\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe\" \/><br \/>\n  <img decoding=\"async\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/8a3a15c8cc99d6a.jpg\" class=\"aligncenter\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe3\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe3\" \/>\n <\/dt>\n<dd>\n   \u95ee\u9898\u5206\u7c7b\u540e\u7684\u591a\u8def\u805a\u5408\n <\/dd>\n<\/dl>\n<p>&nbsp;<\/p>\n<h3>\u683c\u5f0f\u8981\u6c42<\/h3>\n<p>\u53d8\u91cf\u805a\u5408\u5668\u652f\u6301\u805a\u5408\u591a\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u5305\u62ec\u5b57\u7b26\u4e32\uff08<code>String<\/code>\uff09\u3001\u6570\u5b57\uff08<code>Number<\/code>\uff09\u3001\u6587\u4ef6\uff08<code>File<\/code>\uff09\u5bf9\u8c61\uff08<code>Object<\/code>\uff09\u4ee5\u53ca\u6570\u7ec4\uff08<code>Array<\/code>\uff09<\/p>\n<p><strong>\u53d8\u91cf\u805a\u5408\u5668\u53ea\u80fd\u805a\u5408\u540c\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u7684\u53d8\u91cf<\/strong>&nbsp;\u3002\u82e5\u7b2c\u4e00\u4e2a\u6dfb\u52a0\u81f3\u53d8\u91cf\u805a\u5408\u8282\u70b9\u5185\u7684\u53d8\u91cf\u6570\u636e\u683c\u5f0f\u4e3a&nbsp;<code>String<\/code>\uff0c\u540e\u7eed\u8fde\u7ebf\u65f6\u4f1a\u81ea\u52a8\u8fc7\u6ee4\u53ef\u6dfb\u52a0\u53d8\u91cf\u4e3a&nbsp;<code>String<\/code>&nbsp;\u7c7b\u578b\u3002<\/p>\n<p><strong>\u805a\u5408\u5206\u7ec4<\/strong><\/p>\n<p>\u5f00\u542f\u805a\u5408\u5206\u7ec4\u540e\uff0c\u53d8\u91cf\u805a\u5408\u5668\u53ef\u4ee5\u805a\u5408\u591a\u7ec4\u53d8\u91cf\uff0c\u5404\u7ec4\u5185\u805a\u5408\u65f6\u8981\u6c42\u540c\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u53d8\u91cf\u8d4b\u503c<\/h2>\n<h3>\u5b9a\u4e49<\/h3>\n<p>\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u7528\u4e8e\u5411\u53ef\u5199\u5165\u53d8\u91cf\u8fdb\u884c\u53d8\u91cf\u8d4b\u503c\uff0c\u5df2\u652f\u6301\u4ee5\u4e0b\u53ef\u5199\u5165\u53d8\u91cf\uff1a<\/p>\n<ul>\n<li>\u3002<\/li>\n<\/ul>\n<p>\u7528\u6cd5\uff1a\u901a\u8fc7\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\uff0c\u4f60\u53ef\u4ee5\u5c06\u5de5\u4f5c\u6d41\u5185\u7684\u53d8\u91cf\u8d4b\u503c\u5230\u4f1a\u8bdd\u53d8\u91cf\u4e2d\u7528\u4e8e\u4e34\u65f6\u5b58\u50a8\uff0c\u5e76\u53ef\u4ee5\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u6301\u7eed\u5f15\u7528\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20887%20473'%3E%3C\/svg%3E\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe4\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe4\" \/> <img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/ac90a2b8b7c76a2.jpg\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe5\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe5\" \/> <\/p>\n<h3>\u573a\u666f\u793a\u4f8b<\/h3>\n<p>\u4f60\u53ef\u4ee5\u5c06\u5bf9\u8bdd\u8fc7\u7a0b\u4e2d\u7684<strong>\u4e0a\u4e0b\u6587\u3001\u4e0a\u4f20\u81f3\u5bf9\u8bdd\u6846\u7684\u6587\u4ef6\u3001\u7528\u6237\u6240\u8f93\u5165\u7684\u504f\u597d\u4fe1\u606f<\/strong>\u7b49\u53d8\u91cf\uff0c\u901a\u8fc7\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u5199\u5165\u81f3\u4f1a\u8bdd\u53d8\u91cf\u5185\uff0c\u7528\u4f5c\u540e\u7eed\u5bf9\u8bdd\u7684\u53c2\u8003\u4fe1\u606f\u3002<\/p>\n<h4>\u573a\u666f 1<\/h4>\n<p><strong>\u81ea\u52a8\u5224\u65ad\u63d0\u53d6\u5e76\u5b58\u50a8\u5bf9\u8bdd\u4e2d\u7684\u4fe1\u606f<\/strong>&nbsp;\uff0c\u5728\u4f1a\u8bdd\u5185\u901a\u8fc7\u4f1a\u8bdd\u53d8\u91cf\u6570\u7ec4\u8bb0\u5f55\u7528\u6237\u8f93\u5165\u7684\u91cd\u8981\u4fe1\u606f\uff0c\u5e76\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u8ba9 LLM \u57fa\u4e8e\u4f1a\u8bdd\u53d8\u91cf\u4e2d\u5b58\u50a8\u7684\u5386\u53f2\u4fe1\u606f\u8fdb\u884c\u4e2a\u6027\u5316\u56de\u590d\u3002<\/p>\n<p>\u793a\u4f8b\uff1a\u5f00\u59cb\u5bf9\u8bdd\u540e\uff0cLLM \u4f1a\u81ea\u52a8\u5224\u65ad\u7528\u6237\u8f93\u5165\u662f\u5426\u5305\u542b\u9700\u8981\u8bb0\u4f4f\u7684\u4e8b\u5b9e\u3001\u504f\u597d\u6216\u5386\u53f2\u8bb0\u5f55\u3002\u5982\u679c\u6709\uff0cLLM \u4f1a\u5148\u63d0\u53d6\u5e76\u5b58\u50a8\u8fd9\u4e9b\u4fe1\u606f\uff0c\u7136\u540e\u518d\u7528\u8fd9\u4e9b\u4fe1\u606f\u4f5c\u4e3a\u4e0a\u4e0b\u6587\u6765\u56de\u7b54\u3002\u5982\u679c\u6ca1\u6709\u65b0\u7684\u4fe1\u606f\u9700\u8981\u4fdd\u5b58\uff0cLLM \u4f1a\u76f4\u63a5\u4f7f\u7528\u81ea\u8eab\u7684\u76f8\u5173\u8bb0\u5fc6\u77e5\u8bc6\u6765\u56de\u7b54\u95ee\u9898\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%202304%20600'%3E%3C\/svg%3E\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe6\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe6\" \/> <img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/9a5c256692703c9.jpg\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe7\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe7\" \/> <\/p>\n<p><strong>\u914d\u7f6e\u6d41\u7a0b\uff1a<\/strong><\/p>\n<ol>\n<li><strong>\u8bbe\u7f6e\u4f1a\u8bdd\u53d8\u91cf<\/strong>&nbsp;\uff1a\u9996\u5148\u8bbe\u7f6e\u4e00\u4e2a\u4f1a\u8bdd\u53d8\u91cf\u6570\u7ec4&nbsp;<code>memories<\/code>\uff0c\u7c7b\u578b\u4e3a array[object]\uff0c\u7528\u4e8e\u5b58\u50a8\u7528\u6237\u7684\u4e8b\u5b9e\u3001\u504f\u597d\u548c\u5386\u53f2\u8bb0\u5f55\u3002<\/li>\n<li><strong>\u5224\u65ad\u548c\u63d0\u53d6\u8bb0\u5fc6<\/strong>&nbsp;\uff1a\n<ul>\n<li>\u6dfb\u52a0\u4e00\u4e2a\u6761\u4ef6\u5224\u65ad\u8282\u70b9\uff0c\u4f7f\u7528 LLM \u6765\u5224\u65ad\u7528\u6237\u8f93\u5165\u662f\u5426\u5305\u542b\u9700\u8981\u8bb0\u4f4f\u7684\u65b0\u4fe1\u606f\u3002<\/li>\n<li>\u5982\u679c\u6709\u65b0\u4fe1\u606f\uff0c\u8d70\u4e0a\u5206\u652f\uff0c\u4f7f\u7528 LLM \u8282\u70b9\u63d0\u53d6\u8fd9\u4e9b\u4fe1\u606f\u3002<\/li>\n<li>\u5982\u679c\u6ca1\u6709\u65b0\u4fe1\u606f\uff0c\u8d70\u4e0b\u5206\u652f\uff0c\u76f4\u63a5\u4f7f\u7528\u73b0\u6709\u8bb0\u5fc6\u56de\u7b54\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u53d8\u91cf\u8d4b\u503c\/\u5199\u5165<\/strong>&nbsp;\uff1a\n<ul>\n<li>\u5728\u4e0a\u5206\u652f\u4e2d\uff0c\u4f7f\u7528\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\uff0c\u5c06\u63d0\u53d6\u51fa\u7684\u65b0\u4fe1\u606f\u8ffd\u52a0\uff08append\uff09\u5230&nbsp;<code>memories<\/code>&nbsp;\u6570\u7ec4\u4e2d\u3002<\/li>\n<li>\u4f7f\u7528\u8f6c\u4e49\u529f\u80fd\u5c06 LLM \u8f93\u51fa\u7684\u6587\u672c\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u9002\u5408\u5b58\u50a8\u5728 array[object] \u4e2d\u7684\u683c\u5f0f\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u53d8\u91cf\u8bfb\u53d6\u548c\u4f7f\u7528<\/strong>&nbsp;\uff1a\n<ul>\n<li>\u5728\u540e\u7eed\u7684 LLM \u8282\u70b9\u4e2d\uff0c\u5c06&nbsp;<code>memories<\/code>&nbsp;\u6570\u7ec4\u4e2d\u7684\u5185\u5bb9\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff0c\u5e76\u63d2\u5165\u5230 LLM \u7684\u63d0\u793a\u8bcd Prompts \u4e2d\u4f5c\u4e3a\u4e0a\u4e0b\u6587\u3002<\/li>\n<li>LLM \u4f7f\u7528\u8fd9\u4e9b\u5386\u53f2\u4fe1\u606f\u6765\u751f\u6210\u4e2a\u6027\u5316\u56de\u590d\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u56fe\u4e2d\u7684 code \u8282\u70b9\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u5c06\u5b57\u7b26\u4e32\u8f6c\u4e49\u4e3a object<\/li>\n<\/ol>\n<p>Copy<\/p>\n<pre><code>import json\r\ndefmain(arg1:str) -&gt;object:\r\ntry:\r\n# Parse the input JSON string\r\ninput_data = json.loads(arg1)\r\n# Extract the memory object\r\nmemory = input_data.get(\"memory\", {})\r\n# Construct the return object\r\nresult ={\r\n\"facts\": memory.get(\"facts\", []),\r\n\"preferences\": memory.get(\"preferences\", []),\r\n\"memories\": memory.get(\"memories\", [])\r\n}\r\nreturn{\r\n\"mem\": result\r\n}\r\nexcept json.JSONDecodeError:\r\nreturn{\r\n\"result\":\"Error: Invalid JSON string\"\r\n}\r\nexceptExceptionas e:\r\nreturn{\r\n\"result\":f\"Error: {str(e)}\"\r\n}\r\n<\/code><\/pre>\n<ol>\n<li>\u5c06 object \u8f6c\u4e49\u4e3a\u5b57\u7b26\u4e32<\/li>\n<\/ol>\n<p>Copy<\/p>\n<pre><code>import json\r\ndefmain(arg1:list) -&gt;str:\r\ntry:\r\n# Assume arg1[0] is the dictionary we need to process\r\ncontext = arg1[0]if arg1 else{}\r\n# Construct the memory object\r\nmemory ={\"memory\": context}\r\n# Convert the object to a JSON string\r\njson_str = json.dumps(memory, ensure_ascii=False, indent=2)\r\n# Wrap the JSON string in &lt;answer&gt; tags\r\nresult =f\"&lt;answer&gt;{json_str}&lt;\/answer&gt;\"\r\nreturn{\r\n\"result\": result\r\n}\r\nexceptExceptionas e:\r\nreturn{\r\n\"result\":f\"&lt;answer&gt;Error: {str(e)}&lt;\/answer&gt;\"\r\n}\r\n<\/code><\/pre>\n<h4>\u573a\u666f 2<\/h4>\n<p><strong>\u8bb0\u5f55\u7528\u6237\u7684\u521d\u59cb\u504f\u597d\u4fe1\u606f<\/strong>&nbsp;\uff0c\u5728\u4f1a\u8bdd\u5185\u8bb0\u4f4f\u7528\u6237\u8f93\u5165\u7684\u8bed\u8a00\u504f\u597d\uff0c\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u6301\u7eed\u4f7f\u7528\u8be5\u8bed\u8a00\u7c7b\u578b\u8fdb\u884c\u56de\u590d\u3002<\/p>\n<p>\u793a\u4f8b\uff1a\u7528\u6237\u5728\u5bf9\u8bdd\u5f00\u59cb\u524d\uff0c\u5728&nbsp;<code>language<\/code>&nbsp;\u8f93\u5165\u6846\u5185\u6307\u5b9a\u4e86 \u201c\u4e2d\u6587\u201d\uff0c\u8be5\u8bed\u8a00\u5c06\u4f1a\u88ab\u5199\u5165\u4f1a\u8bdd\u53d8\u91cf\uff0cLLM \u5728\u540e\u7eed\u8fdb\u884c\u7b54\u590d\u65f6\u4f1a\u53c2\u8003\u4f1a\u8bdd\u53d8\u91cf\u4e2d\u7684\u4fe1\u606f\uff0c\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u6301\u7eed\u4f7f\u7528\u201c\u4e2d\u6587\u201d\u8fdb\u884c\u56de\u590d\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20615%20565'%3E%3C\/svg%3E\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe8\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe8\" \/> <img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/a0064a1f91d07b2.jpg\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe9\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe9\" \/> <\/p>\n<p><strong>\u914d\u7f6e\u6d41\u7a0b\uff1a<\/strong><\/p>\n<p><strong>\u8bbe\u7f6e\u4f1a\u8bdd\u53d8\u91cf<\/strong>&nbsp;\uff1a\u9996\u5148\u8bbe\u7f6e\u4e00\u4e2a\u4f1a\u8bdd\u53d8\u91cf&nbsp;<code>language<\/code>\uff0c\u5728\u4f1a\u8bdd\u6d41\u7a0b\u5f00\u59cb\u65f6\u6dfb\u52a0\u4e00\u4e2a\u6761\u4ef6\u5224\u65ad\u8282\u70b9\uff0c\u7528\u6765\u5224\u65ad&nbsp;<code>language<\/code>&nbsp;\u53d8\u91cf\u7684\u503c\u662f\u5426\u4e3a\u7a7a\u3002<\/p>\n<p><strong>\u53d8\u91cf\u5199\u5165\/\u8d4b\u503c<\/strong>&nbsp;\uff1a\u9996\u8f6e\u5bf9\u8bdd\u5f00\u59cb\u65f6\uff0c\u82e5&nbsp;<code>language<\/code>&nbsp;\u53d8\u91cf\u503c\u4e3a\u7a7a\uff0c\u5219\u4f7f\u7528 LLM \u8282\u70b9\u6765\u63d0\u53d6\u7528\u6237\u8f93\u5165\u7684\u8bed\u8a00\uff0c\u518d\u901a\u8fc7\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u5c06\u8be5\u8bed\u8a00\u7c7b\u578b\u5199\u5165\u5230\u4f1a\u8bdd\u53d8\u91cf&nbsp;<code>language<\/code>&nbsp;\u4e2d\u3002<\/p>\n<p><strong>\u53d8\u91cf\u8bfb\u53d6<\/strong>&nbsp;\uff1a\u5728\u540e\u7eed\u5bf9\u8bdd\u8f6e\u6b21\u4e2d&nbsp;<code>language<\/code>&nbsp;\u53d8\u91cf\u5df2\u5b58\u50a8\u7528\u6237\u8bed\u8a00\u504f\u597d\u3002\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\uff0cLLM \u8282\u70b9\u901a\u8fc7\u5f15\u7528 language \u53d8\u91cf\uff0c\u4f7f\u7528\u7528\u6237\u7684\u504f\u597d\u8bed\u8a00\u7c7b\u578b\u8fdb\u884c\u56de\u590d\u3002<\/p>\n<p><strong>\u573a\u666f 3<\/strong><\/p>\n<p><strong>\u8f85\u52a9 Checklist \u68c0\u67e5<\/strong>&nbsp;\uff0c\u5728\u4f1a\u8bdd\u5185\u901a\u8fc7\u4f1a\u8bdd\u53d8\u91cf\u8bb0\u5f55\u7528\u6237\u7684\u8f93\u5165\u9879\uff0c\u66f4\u65b0 Checklist \u4e2d\u7684\u5185\u5bb9\uff0c\u5e76\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u68c0\u67e5\u9057\u6f0f\u9879\u3002<\/p>\n<p>\u793a\u4f8b\uff1a\u5f00\u59cb\u5bf9\u8bdd\u540e\uff0cLLM \u4f1a\u8981\u6c42\u7528\u6237\u5728\u5bf9\u8bdd\u6846\u5185\u8f93\u5165 Checklist \u6240\u6d89\u53ca\u7684\u4e8b\u9879\uff0c\u7528\u6237\u4e00\u65e6\u63d0\u53ca\u4e86 Checklist \u4e2d\u7684\u5185\u5bb9\uff0c\u5c06\u4f1a\u66f4\u65b0\u5e76\u5b58\u50a8\u81f3\u4f1a\u8bdd\u53d8\u91cf\u5185\u3002LLM \u4f1a\u5728\u6bcf\u8f6e\u5bf9\u8bdd\u540e\u63d0\u9192\u7528\u6237\u7ee7\u7eed\u8865\u5145\u9057\u6f0f\u9879\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%202304%20926'%3E%3C\/svg%3E\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe10\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe10\" \/> <img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/bd8d97fdf4bb4d2.jpg\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe11\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe11\" \/> <\/p>\n<p><strong>\u914d\u7f6e\u6d41\u7a0b\uff1a<\/strong><\/p>\n<ul>\n<li><strong>\u8bbe\u7f6e\u4f1a\u8bdd\u53d8\u91cf\uff1a<\/strong>&nbsp;\u9996\u5148\u8bbe\u7f6e\u4e00\u4e2a\u4f1a\u8bdd\u53d8\u91cf&nbsp;<code>ai_checklist<\/code>\uff0c\u5728 LLM \u5185\u5f15\u7528\u8be5\u53d8\u91cf\u4f5c\u4e3a\u4e0a\u4e0b\u6587\u8fdb\u884c\u68c0\u67e5\u3002<\/li>\n<li><strong>\u53d8\u91cf\u8d4b\u503c\/\u5199\u5165\uff1a<\/strong>&nbsp;\u6bcf\u4e00\u8f6e\u5bf9\u8bdd\u65f6\uff0c\u5728 LLM \u8282\u70b9\u5185\u68c0\u67e5&nbsp;<code>ai_checklist<\/code>&nbsp;\u5185\u7684\u503c\u5e76\u6bd4\u5bf9\u7528\u6237\u8f93\u5165\uff0c\u82e5\u7528\u6237\u63d0\u4f9b\u4e86\u65b0\u7684\u4fe1\u606f\uff0c\u5219\u66f4\u65b0 Checklist \u5e76\u5c06\u8f93\u51fa\u5185\u5bb9\u901a\u8fc7\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u5199\u5165\u5230&nbsp;<code>ai_checklist<\/code>&nbsp;\u5185\u3002<\/li>\n<li><strong>\u53d8\u91cf\u8bfb\u53d6\uff1a<\/strong>&nbsp;\u6bcf\u4e00\u8f6e\u5bf9\u8bdd\u8bfb\u53d6&nbsp;<code>ai_cheklist<\/code>&nbsp;\u5185\u7684\u503c\u5e76\u6bd4\u5bf9\u7528\u6237\u8f93\u5165\u76f4\u81f3\u6240\u6709 checklist \u5b8c\u6210\u3002<\/li>\n<\/ul>\n<h3>\u4f7f\u7528\u53d8\u91cf\u8d4b\u503c\u8282\u70b9<\/h3>\n<p>\u70b9\u51fb\u8282\u70b9\u53f3\u4fa7&nbsp;<code>\uff0b<\/code>&nbsp;\u53f7\uff0c\u9009\u62e9&nbsp;<strong>\u201c\u53d8\u91cf\u8d4b\u503c\u201d<\/strong>&nbsp;\u8282\u70b9\uff0c\u914d\u7f6e\u9700\u8981\u88ab\u8d4b\u503c\u7684\u53d8\u91cf\u4e0e\u6e90\u53d8\u91cf\u3002\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u652f\u6301\u540c\u65f6\u4e3a\u591a\u4e2a\u53d8\u91cf\u8d4b\u503c\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201058%20691'%3E%3C\/svg%3E\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe12\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe12\" \/> <img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/12\/14ababfdc672569.jpg\" title=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe13\" alt=\"Dify\u5de5\u4f5c\u6d41\u4e2d\u7684\u53d8\u91cf\u805a\u5408\u548c\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u63d2\u56fe13\" \/> <\/p>\n<h4>\u8bbe\u7f6e\u53d8\u91cf<\/h4>\n<p><strong>\u53d8\u91cf\uff1a<\/strong>&nbsp;\u9009\u62e9\u9700\u8981\u88ab\u8d4b\u503c\u7684\u53d8\u91cf\u3002<\/p>\n<p><strong>\u8bbe\u7f6e\u53d8\u91cf\uff1a<\/strong>&nbsp;\u9009\u62e9\u9700\u8981\u8d4b\u503c\u7684\u53d8\u91cf\uff0c\u5373\u6307\u5b9a\u9700\u8981\u88ab\u8f6c\u6362\u7684\u6e90\u53d8\u91cf\u3002<\/p>\n<p>\u4e0a\u56fe\u7684\u53d8\u91cf\u8d4b\u503c\u903b\u8f91\uff1a\u5c06\u7528\u6237\u5728\u521d\u59cb\u9875\u9762\u586b\u5199\u7684\u8bed\u8a00\u504f\u597d&nbsp;<code>Start\/language<\/code>&nbsp;\u53d8\u91cf\u8d4b\u503c\u81f3\u7cfb\u7edf\u7ea7\u4f1a\u8bdd\u53d8\u91cf&nbsp;<code>language<\/code>&nbsp;\u5185\u3002<\/p>\n<h4>\u6307\u5b9a\u53d8\u91cf\u7684\u5199\u5165\u6a21\u5f0f<\/h4>\n<p>\u76ee\u6807\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u5c06\u5f71\u54cd\u53d8\u91cf\u7684\u5199\u5165\u6a21\u5f0f\u3002\u4ee5\u4e0b\u662f\u4e0d\u540c\u53d8\u91cf\u95f4\u7684\u5199\u5165\u6a21\u5f0f\uff1a<\/p>\n<ol>\n<li>\u76ee\u6807\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u4e3a&nbsp;<code>String<\/code>\u3002<\/li>\n<\/ol>\n<ul>\n<li><strong>\u8986\u76d6<\/strong>&nbsp;\uff0c\u5c06\u6e90\u53d8\u91cf\u76f4\u63a5\u8986\u76d6\u81f3\u76ee\u6807\u53d8\u91cf<\/li>\n<li><strong>\u6e05\u7a7a<\/strong>&nbsp;\uff0c\u6e05\u7a7a\u6240\u9009\u4e2d\u53d8\u91cf\u4e2d\u7684\u5185\u5bb9<\/li>\n<li><strong>\u8bbe\u7f6e<\/strong>&nbsp;\uff0c\u624b\u52a8\u6307\u5b9a\u4e00\u4e2a\u503c\uff0c\u65e0\u9700\u8bbe\u7f6e\u6e90\u53d8\u91cf<\/li>\n<\/ul>\n<ol>\n<li>\u76ee\u6807\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u4e3a&nbsp;<code>Number<\/code>\u3002<\/li>\n<\/ol>\n<ul>\n<li><strong>\u8986\u76d6<\/strong>&nbsp;\uff0c\u5c06\u6e90\u53d8\u91cf\u76f4\u63a5\u8986\u76d6\u81f3\u76ee\u6807\u53d8\u91cf<\/li>\n<li><strong>\u6e05\u7a7a<\/strong>&nbsp;\uff0c\u6e05\u7a7a\u6240\u9009\u4e2d\u53d8\u91cf\u4e2d\u7684\u5185\u5bb9<\/li>\n<li><strong>\u8bbe\u7f6e<\/strong>&nbsp;\uff0c\u624b\u52a8\u6307\u5b9a\u4e00\u4e2a\u503c\uff0c\u65e0\u9700\u8bbe\u7f6e\u6e90\u53d8\u91cf<\/li>\n<li><strong>\u6570\u5b57\u5904\u7406<\/strong>&nbsp;\uff0c\u5bf9\u76ee\u6807\u53d8\u91cf\u8fdb\u884c<code>\u52a0\u51cf\u4e58\u9664<\/code>\u64cd\u4f5c<\/li>\n<\/ul>\n<ol>\n<li>\u76ee\u6807\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u4e3a&nbsp;<code>Object<\/code>\u3002<\/li>\n<\/ol>\n<ul>\n<li><strong>\u8986\u76d6<\/strong>&nbsp;\uff0c\u5c06\u6e90\u53d8\u91cf\u7684\u5185\u5bb9\u76f4\u63a5\u8986\u76d6\u81f3\u76ee\u6807\u53d8\u91cf<\/li>\n<li><strong>\u6e05\u7a7a<\/strong>&nbsp;\uff0c\u6e05\u7a7a\u6240\u9009\u4e2d\u53d8\u91cf\u4e2d\u7684\u5185\u5bb9<\/li>\n<li><strong>\u8bbe\u7f6e<\/strong>&nbsp;\uff0c\u624b\u52a8\u6307\u5b9a\u4e00\u4e2a\u503c\uff0c\u65e0\u9700\u8bbe\u7f6e\u6e90\u53d8\u91cf<\/li>\n<\/ul>\n<ol>\n<li>\u76ee\u6807\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u4e3a&nbsp;<code>Array<\/code>\u3002<\/li>\n<\/ol>\n<ul>\n<li><strong>\u8986\u76d6<\/strong>&nbsp;\uff0c\u5c06\u6e90\u53d8\u91cf\u7684\u5185\u5bb9\u76f4\u63a5\u8986\u76d6\u81f3\u76ee\u6807\u53d8\u91cf<\/li>\n<li><strong>\u6e05\u7a7a<\/strong>&nbsp;\uff0c\u6e05\u7a7a\u6240\u9009\u4e2d\u53d8\u91cf\u4e2d\u7684\u5185\u5bb9<\/li>\n<li><strong>\u8ffd\u52a0<\/strong>&nbsp;\uff0c\u5728\u76ee\u6807\u7684\u6570\u7ec4\u53d8\u91cf\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u5143\u7d20<\/li>\n<li><strong>\u6269\u5c55<\/strong>&nbsp;\uff0c\u5728\u76ee\u6807\u7684\u6570\u7ec4\u53d8\u91cf\u4e2d\u6dfb\u52a0\u65b0\u7684\u6570\u7ec4\uff0c\u5373\u4e00\u6b21\u6027\u6dfb\u52a0\u591a\u4e2a\u5143\u7d20<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u53d8\u91cf\u805a\u5408 \u5b9a\u4e49 \u5c06\u591a\u8def\u5206\u652f\u7684\u53d8\u91cf\u805a\u5408\u4e3a\u4e00\u4e2a\u53d8\u91cf\uff0c\u4ee5\u5b9e\u73b0\u4e0b\u6e38\u8282\u70b9\u7edf\u4e00\u914d\u7f6e\u3002 \u53d8\u91cf\u805a\u5408\u8282\u70b9\uff08\u539f\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\uff09\u662f\u5de5\u4f5c\u6d41\u7a0b\u4e2d\u7684\u4e00\u4e2a\u5173\u952e\u8282\u70b9\uff0c\u5b83\u8d1f\u8d23\u6574\u5408\u4e0d\u540c\u5206\u652f\u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u786e\u4fdd\u65e0\u8bba\u54ea\u4e2a\u5206\u652f\u88ab\u6267\u884c\uff0c\u5176\u7ed3\u679c\u90fd\u80fd\u901a\u8fc7\u4e00\u4e2a\u7edf\u4e00\u7684\u53d8\u91cf\u6765\u5f15\u7528\u548c\u8bbf\u95ee\u3002\u8fd9\u5728\u591a\u5206\u652f\u7684\u60c5\u51b5\u4e0b\u975e\u5e38\u6709\u7528\uff0c\u53ef\u5c06\u4e0d\u540c\u5206\u652f\u4e0b\u76f8\u540c\u4f5c\u7528\u7684\u53d8\u91cf\u6620\u5c04\u4e3a\u4e00\u4e2a\u8f93\u51fa\u53d8\u91cf\uff0c\u907f\u514d\u4e0b\u6e38\u8282\u70b9\u91cd\u590d\u5b9a\u4e49\u3002 \u573a\u666f \u901a\u8fc7\u53d8\u91cf\u805a\u5408\uff0c\u53ef\u4ee5\u5c06\u8bf8\u5982\u95ee\u9898\u5206\u7c7b\u6216\u6761\u4ef6\u5206\u652f\u7b49\u591a\u8def\u8f93\u51fa\u805a\u5408\u4e3a\u5355\u8def\uff0c\u4f9b\u6d41\u7a0b\u4e0b\u6e38\u7684\u8282\u70b9\u4f7f\u7528\u548c\u64cd\u4f5c\uff0c\u7b80\u5316\u4e86\u6570\u636e\u6d41\u7684\u7ba1\u7406\u3002 \u95ee\u9898\u5206\u7c7b\u540e\u7684\u591a\u8def\u805a\u5408 \u672a\u6dfb\u52a0\u53d8\u91cf\u805a\u5408\uff0c\u5206\u7c7b1 \u548c \u5206\u7c7b 2 \u5206\u652f\u7ecf\u4e0d\u540c\u7684\u77e5\u8bc6\u5e93\u68c0\u7d22\u540e\u9700\u8981\u91cd\u590d\u5b9a\u4e49\u4e0b\u6e38\u7684 LLM \u548c\u76f4\u63a5\u56de\u590d\u8282\u70b9\u3002 \u95ee\u9898\u5206\u7c7b\uff08\u65e0\u53d8\u91cf\u805a\u5408\uff09 &nbsp; \u6dfb\u52a0\u53d8\u91cf\u805a\u5408\uff0c\u53ef\u4ee5\u5c06\u4e24\u4e2a\u77e5\u8bc6\u68c0\u7d22\u8282\u70b9\u7684\u8f93\u51fa\u805a\u5408\u4e3a\u4e00\u4e2a\u53d8\u91cf\u3002 \u95ee\u9898\u5206\u7c7b\u540e\u7684\u591a\u8def\u805a\u5408 &nbsp; IF\/ELSE \u6761\u4ef6\u5206\u652f\u540e\u7684\u591a\u8def\u805a\u5408 \u95ee\u9898\u5206\u7c7b\u540e\u7684\u591a\u8def\u805a\u5408 &nbsp; \u683c\u5f0f\u8981\u6c42 \u53d8\u91cf\u805a\u5408\u5668\u652f\u6301\u805a\u5408\u591a\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u5305\u62ec\u5b57\u7b26\u4e32\uff08String\uff09\u3001\u6570\u5b57\uff08Number\uff09\u3001\u6587\u4ef6\uff08File\uff09\u5bf9\u8c61\uff08Object\uff09\u4ee5\u53ca\u6570\u7ec4\uff08Array\uff09 \u53d8\u91cf\u805a\u5408\u5668\u53ea\u80fd\u805a\u5408\u540c\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u7684\u53d8\u91cf&nbsp;\u3002\u82e5\u7b2c\u4e00\u4e2a\u6dfb\u52a0\u81f3\u53d8\u91cf\u805a\u5408\u8282\u70b9\u5185\u7684\u53d8\u91cf\u6570\u636e\u683c\u5f0f\u4e3a&nbsp;String\uff0c\u540e\u7eed\u8fde\u7ebf\u65f6\u4f1a\u81ea\u52a8\u8fc7\u6ee4\u53ef\u6dfb\u52a0\u53d8\u91cf\u4e3a&nbsp;String&nbsp;\u7c7b\u578b\u3002 \u805a\u5408\u5206\u7ec4 \u5f00\u542f\u805a\u5408\u5206\u7ec4\u540e\uff0c\u53d8\u91cf\u805a\u5408\u5668\u53ef\u4ee5\u805a\u5408\u591a\u7ec4\u53d8\u91cf\uff0c\u5404\u7ec4\u5185\u805a\u5408\u65f6\u8981\u6c42\u540c\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u3002 &nbsp; \u53d8\u91cf\u8d4b\u503c \u5b9a\u4e49 \u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u7528\u4e8e\u5411\u53ef\u5199\u5165\u53d8\u91cf\u8fdb\u884c\u53d8\u91cf\u8d4b\u503c\uff0c\u5df2\u652f\u6301\u4ee5\u4e0b\u53ef\u5199\u5165\u53d8\u91cf\uff1a \u3002 \u7528\u6cd5\uff1a\u901a\u8fc7\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\uff0c\u4f60\u53ef\u4ee5\u5c06\u5de5\u4f5c\u6d41\u5185\u7684\u53d8\u91cf\u8d4b\u503c\u5230\u4f1a\u8bdd\u53d8\u91cf\u4e2d\u7528\u4e8e\u4e34\u65f6\u5b58\u50a8\uff0c\u5e76\u53ef\u4ee5\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u6301\u7eed\u5f15\u7528\u3002 \u573a\u666f\u793a\u4f8b \u4f60\u53ef\u4ee5\u5c06\u5bf9\u8bdd\u8fc7\u7a0b\u4e2d\u7684\u4e0a\u4e0b\u6587\u3001\u4e0a\u4f20\u81f3\u5bf9\u8bdd\u6846\u7684\u6587\u4ef6\u3001\u7528\u6237\u6240\u8f93\u5165\u7684\u504f\u597d\u4fe1\u606f\u7b49\u53d8\u91cf\uff0c\u901a\u8fc7\u53d8\u91cf\u8d4b\u503c\u8282\u70b9\u5199\u5165\u81f3\u4f1a\u8bdd\u53d8\u91cf\u5185\uff0c\u7528\u4f5c\u540e\u7eed\u5bf9\u8bdd\u7684\u53c2\u8003\u4fe1\u606f\u3002 \u573a\u666f 1 \u81ea\u52a8\u5224\u65ad\u63d0\u53d6\u5e76\u5b58\u50a8\u5bf9\u8bdd\u4e2d\u7684\u4fe1\u606f&nbsp;\uff0c\u5728\u4f1a\u8bdd\u5185\u901a\u8fc7\u4f1a\u8bdd\u53d8\u91cf\u6570\u7ec4\u8bb0\u5f55\u7528\u6237\u8f93\u5165\u7684\u91cd\u8981\u4fe1\u606f\uff0c\u5e76\u5728\u540e\u7eed\u5bf9\u8bdd\u4e2d\u8ba9 LLM \u57fa\u4e8e\u4f1a\u8bdd\u53d8\u91cf\u4e2d\u5b58\u50a8\u7684\u5386\u53f2\u4fe1\u606f\u8fdb\u884c\u4e2a\u6027\u5316\u56de\u590d\u3002 \u793a\u4f8b\uff1a\u5f00\u59cb\u5bf9\u8bdd\u540e\uff0cLLM \u4f1a\u81ea\u52a8\u5224\u65ad\u7528\u6237\u8f93\u5165\u662f\u5426\u5305\u542b\u9700\u8981\u8bb0\u4f4f\u7684\u4e8b\u5b9e\u3001\u504f\u597d\u6216\u5386\u53f2\u8bb0\u5f55\u3002\u5982\u679c\u6709\uff0cLLM \u4f1a\u5148\u63d0\u53d6\u5e76\u5b58\u50a8\u8fd9\u4e9b\u4fe1\u606f\uff0c\u7136\u540e\u518d\u7528\u8fd9\u4e9b\u4fe1\u606f\u4f5c\u4e3a\u4e0a\u4e0b\u6587\u6765\u56de\u7b54\u3002\u5982\u679c\u6ca1\u6709\u65b0\u7684\u4fe1\u606f\u9700\u8981\u4fdd\u5b58\uff0cLLM \u4f1a\u76f4\u63a5\u4f7f\u7528\u81ea\u8eab\u7684\u76f8\u5173\u8bb0\u5fc6\u77e5\u8bc6\u6765\u56de\u7b54\u95ee\u9898\u3002 \u914d\u7f6e\u6d41\u7a0b\uff1a \u8bbe\u7f6e\u4f1a\u8bdd\u53d8\u91cf&nbsp;\uff1a\u9996\u5148\u8bbe\u7f6e\u4e00\u4e2a\u4f1a\u8bdd\u53d8\u91cf\u6570\u7ec4&nbsp;memories\uff0c\u7c7b\u578b\u4e3a array[object]\uff0c\u7528\u4e8e\u5b58\u50a8\u7528\u6237\u7684\u4e8b\u5b9e\u3001\u504f\u597d\u548c\u5386\u53f2\u8bb0\u5f55\u3002 \u5224\u65ad\u548c\u63d0\u53d6\u8bb0\u5fc6&nbsp;\uff1a \u6dfb\u52a0\u4e00\u4e2a\u6761\u4ef6\u5224\u65ad\u8282\u70b9\uff0c\u4f7f\u7528 LLM \u6765\u5224\u65ad\u7528\u6237\u8f93\u5165\u662f\u5426\u5305\u542b\u9700\u8981\u8bb0\u4f4f\u7684\u65b0\u4fe1\u606f\u3002 \u5982\u679c\u6709\u65b0\u4fe1\u606f\uff0c\u8d70\u4e0a\u5206\u652f\uff0c\u4f7f\u7528 LLM \u8282\u70b9\u63d0\u53d6\u8fd9\u4e9b\u4fe1\u606f\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-55819","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/55819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=55819"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/55819\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=55819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=55819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=55819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}