{"id":685,"date":"2026-04-29T15:49:52","date_gmt":"2026-04-29T07:49:52","guid":{"rendered":"http:\/\/ai.taichi-maker.com\/?page_id=685"},"modified":"2026-05-11T14:47:31","modified_gmt":"2026-05-11T06:47:31","slug":"aid101-1-3-01-ai-model-tool-calls-basics","status":"publish","type":"page","link":"http:\/\/ai.taichi-maker.com\/index.php\/homepage\/ai-tutorial-index\/ai-maker-project-tutorial-index\/ai-basics\/aid101-1-3-01-ai-model-tool-calls-basics\/","title":{"rendered":"AI\u521b\u5ba2\u9879\u76ee\u5f00\u53d1\u6559\u7a0b \u2013 AID101-1-3-01 &#8211; AI\u5927\u6a21\u578b\u5de5\u5177\u8c03\u7528\u57fa\u7840"},"content":{"rendered":"\n<p>\u5bfc\u822a\u680f\uff1a<a href=\"http:\/\/ai.taichi-maker.com\/\">\u9996\u9875<\/a> \/ <a href=\"http:\/\/ai.taichi-maker.com\/index.php\/homepage\/ai-tutorial-index\/\">AI\u6559\u7a0b\u76ee\u5f55<\/a> \/ <a href=\"http:\/\/ai.taichi-maker.com\/index.php\/homepage\/ai-tutorial-index\/ai-maker-project-tutorial-index\/\">AI\u521b\u5ba2\u9879\u76ee\u5f00\u53d1\u6559\u7a0b\u76ee\u5f55<\/a> \/ <a href=\"http:\/\/ai.taichi-maker.com\/index.php\/homepage\/ai-tutorial-index\/ai-maker-project-tutorial-index\/ai-basics\/\">\u7b2c1\u7bc7 \u57fa\u7840\u77e5\u8bc6\u7bc7<\/a> \/ AID101-1-3-01 \u2013 AI\u5927\u6a21\u578b\u5de5\u5177\u8c03\u7528\u57fa\u7840<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u672c\u8282\u5185\u5bb9\u7b80\u4ecb<\/h2>\n\n\n\n<p>\u672c\u8282\u5c06\u8be6\u7ec6\u8bb2\u89e3\u5982\u4f55\u901a\u8fc7 AI \u5927\u8bed\u8a00\u6a21\u578b\u7684 Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09\u529f\u80fd\uff0c\u8ba9 ESP32 \u5f00\u53d1\u677f\u6839\u636e\u7528\u6237\u7684\u81ea\u7136\u8bed\u8a00\u6307\u4ee4\u63a7\u5236ESP32 S3\u5f00\u53d1\u677f\u7684\u677f\u8f7d LED \u3002\u901a\u8fc7\u672c\u8282\u8bfe\u7a0b\uff0c\u60a8\u5c06\u7406\u89e3 Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09 \u7684\u6838\u5fc3\u6982\u5ff5\u3001\u5de5\u4f5c\u6d41\u7a0b\uff0c\u4ee5\u53ca\u5982\u4f55\u5728 ESP32 \u4e0a\u5b9e\u73b0 AI \u9a71\u52a8\u7684\u786c\u4ef6\u63a7\u5236\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09\u8be6\u89e3<\/h2>\n\n\n\n<p><strong>\u4ec0\u4e48\u662f Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09\uff08\u5de5\u5177\u8c03\u7528\uff09\uff1f<\/strong><\/p>\n\n\n\n<p>Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09\u662f\u73b0\u4ee3\u5927\u8bed\u8a00\u6a21\u578b\u7684\u4e00\u9879\u91cd\u8981\u529f\u80fd\uff0c<strong>\u5b83\u8ba9 AI \u4e0d\u4ec5\u80fd\u201c\u8bf4\u8bdd\u201d\uff0c\u4e3b\u52a8\u8c03\u7528\u9884\u5b9a\u4e49\u7684\u5de5\u5177\uff0c\u4e3a\u6211\u4eec\u201c\u529e\u4e8b\u201d<\/strong>\u3002\u5728\u7269\u8054\u7f51\uff08IoT\uff09\u573a\u666f\u4e2d\uff0cTool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09 \u80fd\u8ba9 AI \u6a21\u578b\u7406\u89e3\u7528\u6237\u6307\u4ee4\uff08\u5982\u7528 ESP32 \u63a7\u5236 LED\u3001\u7ee7\u7535\u5668\u6216\u8bfb\u53d6\u4f20\u611f\u5668\u8bfb\u6570\u7b49\uff09\uff0c\u5e76\u751f\u6210\u7ed3\u6784\u5316\u7684\u63a7\u5236\u547d\u4ee4\uff0c\u7531 ESP32 \u6267\u884c\u64cd\u4f5c\uff0c\u5b9e\u73b0\u8bbe\u5907\u63a7\u5236\u76ee\u7684\u3002<\/p>\n\n\n\n<p>\u5728\u524d\u51e0\u7ae0\u7684\u8bfe\u7a0b\u4e2d\uff0c\u6211\u4eec\u5b66\u4e60\u4e86\u901a\u8fc7 System Role\u3001User Role \u548c Assistant Role \u4e0e AI \u8fdb\u884c\u6587\u672c\u5bf9\u8bdd\u3002\u4f46\u8fd9\u79cd\u65b9\u5f0f\u6709\u4e00\u4e2a\u660e\u663e\u7684\u5c40\u9650\uff1aAI \u53ea\u80fd&#8221;\u8bf4&#8221;\uff0c\u4e0d\u80fd&#8221;\u505a&#8221;\u3002\u6bd4\u5982\uff0c\u5f53\u7528\u6237\u8bf4&#8221;\u6253\u5f00LED&#8221;\u65f6\uff0cAI \u65e0\u6cd5\u771f\u6b63\u63a7\u5236 LED \u7684\u5f00\u5173\u3002Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09 \u6b63\u662f\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u800c\u8bde\u751f\u7684\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udd01 Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09\u6574\u4f53\u6d41\u7a0b\u6982\u89c8<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1567\" height=\"125\" src=\"http:\/\/ai.taichi-maker.com\/wp-content\/uploads\/2026\/04\/AI_Tool_Calls_Flow_Chart.jpg\" alt=\"AI_Tool_Calls_Flow_Chart\" class=\"wp-image-691\"\/><\/figure>\n\n\n\n<p><strong>\u6ce8\u610f\uff1a\u5bf9\u4e8e\u672c\u7ae0\u6559\u7a0b\u6765\u8bf4\uff0c\u201c\u5de5\u5177\u8c03\u7528\u201d\u4e2d\u6240\u63d0\u5230\u7684\u201c\u5de5\u5177\u201d\u8fd9\u4e00\u6982\u5ff5\u6307\u7684\u662fESP32\u7a0b\u5e8f\u4e2d\u7684\u53ef\u4ee5\u6267\u884c\u4efb\u52a1\u7684\u51fd\u6570\u3002\u57fa\u4e8e\u8fd9\u4e2a\u539f\u56e0\uff0c\u5728\u540e\u7eed\u7684\u8bb2\u89e3\u4e2d\uff0c\u5982\u679c\u60a8\u5728\u770b\u5230\u5de5\u5177\u7684\u65f6\u5019\uff0c\u8bf7\u9a6c\u4e0a\u8054\u60f3\u5230\u67d0\u4e2aESP32\u7a0b\u5e8f\u4e2d\u7684\u51fd\u6570\u3002<\/strong><\/p>\n\n\n\n<p>\u6574\u4e2a<strong>\u5de5\u5177\u8c03\u7528<\/strong>\u8fc7\u7a0b\u5206\u4e3a\u4e09\u4e2a\u9636\u6bb5\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u8bf7\u6c42\u9636\u6bb5<\/strong>\uff1aESP32 \u5411 AI \u5e73\u53f0\u53d1\u9001\u5305\u542b\u201c\u7528\u6237\u6307\u4ee4 + \u53ef\u7528\u5de5\u5177\u5217\u8868\uff08\u53ef\u7528\u51fd\u6570\u5217\u8868\uff09\u201d\u7684\u8bf7\u6c42\u3002<\/li>\n\n\n\n<li>\u5206\u6790<strong>\u54cd\u5e94\u9636\u6bb5<\/strong>\uff1aAI \u6536\u5230 ESP32 \u53d1\u6765\u7684\u8bf7\u6c42\u540e\uff0c\u5bf9\u8bf7\u6c42\u5185\u5bb9\u8fdb\u5206\u6790\u3002\u7136\u540eAI\u5c06\u5206\u6790\u7ed3\u679c\u8fd4\u56de ESP32\uff0c\u544a\u77e5ESP32\u201c\u8981\u8c03\u54ea\u4e2a\u51fd\u6570\u3001\u4f20\u4ec0\u4e48\u53c2\u6570\u201d<\/li>\n\n\n\n<li><strong>\u6267\u884c\u9636\u6bb5<\/strong>\uff1aESP32 \u6839\u636eAI\u7684\u6307\u4ee4\u6765\u8c03\u7528\u5de5\u5177\u51fd\u6570\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u6ce8\u610f\uff1a\u4ee5\u4e0a\u8fc7\u7a0b\u4e2d\uff0c\u5b9e\u9645\u6267\u884c\u51fd\u6570\u7684\u662fESP32\uff0c\u800c\u4e0d\u662fAI\u6a21\u578b\u3002AI\u6a21\u578b\u4ec5\u4ec5\u8d77\u5230\u5c06\u6211\u4eec\u7684\u81ea\u7136\u8bed\u8a00\u6307\u4ee4\uff08\u6bd4\u5982\u201c\u6253\u5f00LED\u201d\uff09\u8f6c\u5316\u4e3a\u8981\u6c42ESP32\u6267\u884c\u54ea\u4e2a\u51fd\u6570\u7684\u6307\u4ee4\u3002\u800cAI\u6a21\u578b\uff0c\u5e76\u4e0d\u5b9e\u9645\u53c2\u4e0e\u5b9e\u9645\u7684\u51fd\u6570\u6267\u884c\u3002\u8fd9\u4e00\u70b9\u975e\u5e38\u5173\u952e\uff0c\u9700\u8981\u7262\u7262\u8bb0\u4f4f\uff0c\u5426\u5219\u540e\u7eed\u5b66\u4e60\u4f1a\u4ea7\u751f\u56f0\u6270\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e00\u9636\u6bb5\uff1aESP32 \u5982\u4f55\u6784\u5efa\u4e00\u4e2a\u5de5\u5177\u8c03\u7528\u8bf7\u6c42\uff1f<\/h2>\n\n\n\n<p>ESP32 \u672c\u8eab\u4e0d\u80fd\u76f4\u63a5\u201c\u7406\u89e3\u201d\u6211\u4eec\u7684\u81ea\u7136\u8bed\u8a00\u6307\u4ee4\uff0c\u4f46ESP32\u53ef\u4ee5\u628a\u6211\u4eec\u7684\u81ea\u7136\u8bed\u8a00\u6307\u4ee4\uff0c\u4ee5\u53ca\u5176\u5b83\u91cd\u8981\u4fe1\u606f<strong>\u7ec4\u88c5\u6210\u4e00\u4e2a\u6807\u51c6 JSON \u8bf7\u6c42\u5305<\/strong>\uff0c\u5e76\u4e14\u5c06\u8fd9\u4e2aJSON\u8bf7\u6c42\u4fe1\u606f\u53d1\u9001\u7ed9\u7c7b\u4f3c\u963f\u91cc\u4e91\u767e\u70bc\u3001OpenAI \u6216\u5176\u4ed6\u652f\u6301 Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09 \u7684 AI \u5e73\u53f0\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\u610f\uff1a\u5e76\u4e0d\u662f\u6240\u4ee5\u7684AI\u6a21\u578b\u90fd\u652f\u6301<strong>\u201c\u5de5\u5177\u8c03\u7528\u201d<\/strong>\u8c03\u7528\u529f\u80fd\uff0c\u60a8\u5728\u9009\u62e9\u7528\u4ec0\u4e48\u6a21\u578b\u6765\u5904\u7406\u5de5\u5177\u8c03\u7528\u8bf7\u6c42\u7684\u65f6\u5019\uff0c\u4e00\u5b9a\u8981\u786e\u5b9a\u8be5\u6a21\u578b\u5177\u5907\u201c\u5de5\u5177\u8c03\u7528\u201d\u5904\u7406\u80fd\u529b\uff0c\u518d\u4f7f\u7528\u5b83\u5904\u7406\u5de5\u5177\u8c03\u7528\u8bf7\u6c42\u3002<\/strong><\/p>\n\n\n\n<p>\ud83d\udce6 \u6807\u51c6 \u5de5\u5177\u8c03\u7528 JSON \u8bf7\u6c42\u5305\u542b 4 \u4e2a\u5173\u952e\u90e8\u5206\uff1a<\/p>\n\n\n\n<p>\u6807\u51c6 \u5de5\u5177\u8c03\u7528 JSON \u8bf7\u6c42\u5305\u542b\u4ee5\u4e0b 4 \u4e2a\u5173\u952e\u90e8\u5206\u3002<\/p>\n\n\n\n<p>1.\u00a0<strong>\u6307\u5b9a\u6a21\u578b<\/strong><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\"model\": \"qwen-flash\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">model<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">qwen-flash<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u544a\u8bc9AI\u5e73\u53f0\uff1a\u201c\u8bf7\u7528\u8fd9\u4e2a\u53eb\u505aqwen-flash\u7684\u6a21\u578b\u6765\u5904\u7406\u5de5\u5177\u8c03\u7528\u201d\u3002<\/p>\n\n\n\n<p>2.\u00a0<strong>\u63d0\u4f9b\u5bf9\u8bdd\u4e0a\u4e0b\u6587\uff08messages\uff09<\/strong><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\"messages\": &#91;\n  {\n    \"role\": \"system\",\n    \"content\": \"\u4f60\u662f\u4e00\u4e2a\u667a\u80fd\u5bb6\u5c45\u52a9\u624b\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u63a7\u5236\u8bbe\u5907\u3002\"\n  },\n  {\n    \"role\": \"user\",\n    \"content\": \"\u6253\u5f00LED\"\n  }\n&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">messages<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">role<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">system<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">content<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u4f60\u662f\u4e00\u4e2a\u667a\u80fd\u5bb6\u5c45\u52a9\u624b\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u63a7\u5236\u8bbe\u5907\u3002<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  }<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">role<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">user<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">content<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u6253\u5f00LED<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>system role<\/code>\uff1a\u8bbe\u5b9a AI \u7684\u89d2\u8272\u3002\u5728\u8fd9\u91cc\u4e2a\u5b9e\u4f8b\u4e2d\uff0cAi\u7684\u89d2\u8272\u662f\u4e00\u4e2a\u667a\u80fd\u5bb6\u5c45\u52a9\u624b\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u63a7\u5236\u8bbe\u5907\u3002<\/li>\n\n\n\n<li><code>user role<\/code>\uff1a\u7528\u6237\u7684\u539f\u59cb\u6307\u4ee4\u3002\u5728\u8fd9\u91cc\u4e2a\u5b9e\u4f8b\u4e2d\uff0c\u7528\u6237\u8981\u6c42ESP32\u6253\u5f00LED\u3002<\/li>\n<\/ul>\n\n\n\n<p>3.\u00a0<strong>\u58f0\u660e\u53ef\u7528\u5de5\u5177\uff08tools\uff09<\/strong><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\"tools\": [\n  {\n    \"type\": \"function\",\n    \"function\": {\n      \"name\": \"controlLEDOnOFF\",\n      \"description\": \"\u63a7\u5236LED\u7684\u6253\u5f00\u6216\u5173\u95ed\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"action\": {\n            \"type\": \"string\",\n            \"description\": \"LED\u63a7\u5236\u52a8\u4f5c\",\n            \"enum\": &#91;\"on\", \"off\"&#93;\n          }\n        },\n        \"required\": &#91;\"action\"&#93;\n      }\n    }\n  }\n]<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tools<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">[<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">controlLEDOnOFF<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u63a7\u5236LED\u7684\u6253\u5f00\u6216\u5173\u95ed<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">parameters<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">object<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">properties<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">string<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">LED\u63a7\u5236\u52a8\u4f5c<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">enum<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">on<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">off<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        }<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">required<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">]<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u8fd9\u6bb5\u5185\u5bb9\u8f83\u4e3a\u590d\u6742\uff0c\u4e0b\u9762\u6211\u5c06<strong>\u9010\u5b57\u6bb5\u3001\u6309\u5c42\u7ea7\u987a\u5e8f<\/strong>\u8be6\u7ec6\u89e3\u91ca\u60a8\u63d0\u5230\u7684&nbsp;<code>tools<\/code>&nbsp;\u6570\u7ec4\u4e2d\u8fd9\u4e2a JSON \u5bf9\u8c61\u7684\u6bcf\u4e00\u4e2a\u7ec4\u6210\u90e8\u5206\uff0c\u5c24\u5176\u91cd\u70b9\u5256\u6790&nbsp;<code>\"function\"<\/code>&nbsp;\u5185\u90e8\u5404\u5b57\u6bb5\u7684\u4f5c\u7528\u548c\u8bbe\u8ba1\u610f\u4e49\u3002\u4ece\u800c\u8ba9\u60a8\u6e05\u6670\u7406\u89e3\uff1a<strong>\u8fd9\u4e2a JSON \u5230\u5e95\u5728\u201c\u544a\u8bc9 AI \u4ec0\u4e48\u201d\uff1f\u4e3a\u4ec0\u4e48\u8fd9\u6837\u5199\uff1f<\/strong><\/p>\n\n\n\n<p>\u9996\u5148\u6211\u4eec\u6765\u6574\u4f53\u770b\u4e00\u4e0b\u8fd9\u4e2a JSON \u5230\u5e95\u5728\u201c\u544a\u8bc9 AI \u4ec0\u4e48\u201d\uff1f<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">\u5b57\u6bb5<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u544a\u8bc9 AI \u7684\u5185\u5bb9<\/th><\/tr><\/thead><tbody><tr><td><code>name<\/code><\/td><td>\u201cAI \u6a21\u578b\u53ef\u4ee5\u8ba9ESP32\u6267\u884c\u4e00\u4e2a\u53eb&nbsp;<code>controlLEDOnOFF<\/code>&nbsp;\u7684\u5de5\u5177\u51fd\u6570\u201d<\/td><\/tr><tr><td><code>description<\/code><\/td><td>\u201c\u8fd9\u4e2a\u53eb&nbsp;<code>controlLEDOnOFF<\/code>&nbsp;\u7684\u5de5\u5177\u51fd\u6570\u662f\u7528\u6765\u63a7\u5236LED\u5f00\u5173\u201d<\/td><\/tr><tr><td><code>parameters<\/code><\/td><td>\u201cparameters \u7528\u4e8e\u5b8c\u6574\u5b9a\u4e49\u8c03\u7528 controlLEDOnOFF \u6240\u9700\u7684\u53c2\u6570\u7c7b\u578b\u548c\u53d6\u503c\u8303\u56f4\u3002\u201d<\/td><\/tr><tr><td><code>parameters.type<\/code><\/td><td>AI \u6a21\u578b\u5fc5\u987b\u5728\u8fd4\u56de\u7684\u54cd\u5e94\u4e2d\u63d0\u4f9b\u4e00\u4e2aJSON\u683c\u5f0f\u7684\u6570\u636e\uff0c\u8be5JSON\u6570\u636e\u5305\u542b\u8fd0\u884c&nbsp;<code>controlLEDOnOFF<\/code>&nbsp;\u5de5\u5177\u51fd\u6570\u6240\u9700\u7684\u53c2\u6570<\/td><\/tr><tr><td><code>parameters.properties<\/code><\/td><td>properties \u5217\u51fa\u4e86<code>controlLEDOnOFF<\/code>&nbsp;\u51fd\u6570\u5141\u8bb8\u4f20\u5165\u7684\u53c2\u6570\u53ca\u5176\u5404\u81ea\u7684\u7c7b\u578b\u548c\u53d6\u503c\u89c4\u5219\u3002<\/td><\/tr><tr><td><code>parameters.properties.action<\/code><\/td><td>\u8fd9\u91cc\u544a\u77e5AI\u6a21\u578b\u53ef\u901a\u8fc7\u540d\u4e3a action \u7684\u5b57\u6bb5\u6765\u63d0\u4f9b\u4e00\u4e2a<code>controlLEDOnOFF<\/code>&nbsp;\u51fd\u6570\u53c2\u6570\u3002<\/td><\/tr><tr><td><code>parameters.properties.action.type<\/code><\/td><td>\u8fd9\u4e2a<code>action<\/code>\u5b57\u6bb5\u6240\u4f20\u9012\u7684\u53c2\u6570\u7c7b\u578b\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\u7684<\/td><\/tr><tr><td><code>parameters.properties.action.enum<\/code><\/td><td>\u201c<code>action<\/code>&nbsp;\u5b57\u6bb5\u6240\u4f20\u9012\u7684\u53c2\u6570\u53ea\u80fd\u662f&nbsp;<code>'on'<\/code>&nbsp;\u6216&nbsp;<code>'off'<\/code>\u8fd9\u4e24\u4e2a\u503c\u4e2d\u7684\u4e00\u4e2a\uff0c\u4e0d\u80fd\u662f\u5176\u5b83\u4efb\u4f55\u5185\u5bb9\uff01\u201d<\/td><\/tr><tr><td><code>required<\/code><\/td><td>\u201c<code>action<\/code>&nbsp;\u5b57\u6bb5\u662f\u5fc5\u987b\u5728AI\u6a21\u578b\u76f8\u5e94\u4fe1\u606f\u91cc\u63d0\u4f9b\u7684\uff0c\u4e0d\u80fd\u7701\u7565\u201d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2705\u00a0<strong>\u6700\u7ec8\u6548\u679c<\/strong>\uff1a\u5982\u679c\u7528\u6237\u60f3\u8981ESP32\u6253\u5f00LED\uff0c\u90a3\u4e48\u5b83\u65e0\u8bba\u8bf4\u201c\u5f00\u706f\u201d\u3001\u201c\u628a LED \u6253\u5f00\u201d\u3001\u201c\u70b9\u4eae\u201d\u6216\u5176\u4ed6\u7c7b\u4f3c\u8868\u8fbe\uff0cAI \u90fd\u4f1a\u6807\u51c6\u5316\u8f93\u51fa\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"name\": \"controlLEDOnOFF\",\n  \"arguments\": {\n    \"action\": \"on\"\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">controlLEDOnOFF<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">arguments<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">on<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>ESP32 \u53ea\u9700\u89e3\u6790\u4ee5\u4e0a\u8fd9\u4e2a\u7ed3\u6784\u5316\u6570\u636e\uff0c\u5373\u53ef\u5f97\u77e5\u8981\u8fd0\u884c\u7684\u51fd\u6570\u540d\u79f0\u662fcontrolLEDOnOFF\u5e76\u4e14\u5728\u8fd0\u884c\u65f6\u4f7f\u7528\u53c2\u6570on\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u8fd9\u79cd<strong>\u4e25\u683c\u7ea6\u675f + \u8bed\u4e49\u63cf\u8ff0<\/strong>\u7684\u65b9\u5f0f\uff0cTool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09 \u5b9e\u73b0\u4e86\u00a0<strong>\u201c\u81ea\u7136\u8bed\u8a00\u8f93\u5165\u201d \u2192 \u201c\u53ef\u9760\u673a\u5668\u6307\u4ee4\u201d<\/strong>\u00a0\u7684\u8f6c\u6362\uff0c\u6781\u5927\u7b80\u5316\u4e86\u667a\u80fd\u786c\u4ef6\u7684\u5f00\u53d1\u6d41\u7a0b\u3002<\/p>\n\n\n\n<p>\u5c0f\u7ed3\uff1a<\/p>\n\n\n\n<p>\u4e0b\u9762\u6211\u4eec\u628a\u4ee5\u4e0a\u793a\u4f8b\u4e2d Tool Calls \u5de5\u5177\u8c03\u7528\u7684\u5b8c\u6574 Json\u5305\u5199\u5728\u4e0b\u9762\uff0c\u4f9b\u60a8\u53c2\u8003\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"model\": \"Qwen\/Qwen3-VL-8B-Instruct\",\n  \"messages\": &#91;\n    {\n      \"role\": \"system\",\n      \"content\": \"\u4f60\u662f\u4e00\u4e2a\u667a\u80fd\u5bb6\u5c45\u52a9\u624b\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u63a7\u5236\u8bbe\u5907\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"\u6253\u5f00LED\"\n    }\n  &#93;,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"controlLEDOnOFF\",\n        \"description\": \"\u63a7\u5236LED\u7684\u6253\u5f00\u6216\u5173\u95ed\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"action\": {\n              \"type\": \"string\",\n              \"description\": \"LED\u63a7\u5236\u52a8\u4f5c\",\n              \"enum\": &#91;\"on\", \"off\"&#93;\n            }\n          },\n          \"required\": &#91;\"action\"&#93;\n        }\n      }\n    }\n  ],\n  \"tool_choice\": \"auto\",\n  \"temperature\": 0.1\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">model<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Qwen\/Qwen3-VL-8B-Instruct<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">messages<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">role<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">system<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">content<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u4f60\u662f\u4e00\u4e2a\u667a\u80fd\u5bb6\u5c45\u52a9\u624b\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u63a7\u5236\u8bbe\u5907<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    }<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">role<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">user<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">content<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u6253\u5f00LED<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&#93;,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tools<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">[<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">controlLEDOnOFF<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u63a7\u5236LED\u7684\u6253\u5f00\u6216\u5173\u95ed<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">parameters<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">object<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">properties<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">string<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">LED\u63a7\u5236\u52a8\u4f5c<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">enum<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">on<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">off<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          }<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">required<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">],<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_choice<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">auto<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">temperature<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0.1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u7ec6\u5fc3\u7684\u670b\u53cb\u53ef\u80fd\u5df2\u7ecf\u53d1\u73b0\u4e86\uff0c\u5728\u4e0a\u9762\u8fd9\u4e2aTool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09\u8bf7\u6c42Json\u5305\u4e2d\uff0c\u8fd8\u6709\u4e24\u4e2a\u5b57\u6bb5\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>  \"tool_choice\": \"auto\",\n  \"temperature\": 0.1<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_choice<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">auto<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">temperature<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0.1<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u4ed6\u4eec\u662f\u53ef\u9009\u5b57\u6bb5\uff0c\u4f5c\u7528\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\"tool_choice\": \"auto\",     \/\/ \u8ba9 AI \u81ea\u5df1\u51b3\u5b9a\u662f\u5426\u8c03\u7528\u5de5\u5177\n\"temperature\": 0.1         \/\/ \u964d\u4f4eAI\u54cd\u5e94\u5185\u5bb9\u7684\u968f\u673a\u6027\uff0c\u786e\u4fddAI\u8f93\u51fa\u7a33\u5b9a\u53ef\u9760<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_choice<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">auto<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #616E88\">     \/\/ \u8ba9 AI \u81ea\u5df1\u51b3\u5b9a\u662f\u5426\u8c03\u7528\u5de5\u5177<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">temperature<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0.1<\/span><span style=\"color: #616E88\">         \/\/ \u964d\u4f4eAI\u54cd\u5e94\u5185\u5bb9\u7684\u968f\u673a\u6027\uff0c\u786e\u4fddAI\u8f93\u51fa\u7a33\u5b9a\u53ef\u9760<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e8c\u9636\u6bb5\uff1aAI \u5e73\u53f0\u5982\u4f55\u5206\u6790\u5e76\u54cd\u5e94\uff1f<\/h2>\n\n\n\n<p>\u5f53 AI \u5e73\u53f0\u6536\u5230\u4e0a\u8ff0\u8bf7\u6c42\u540e\uff0c\u4f1a\u8fdb\u884c\u4ee5\u4e0b\u667a\u80fd\u5206\u6790\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"-\u5206\u6790\u8fc7\u7a0b\">\ud83d\udd0d \u5206\u6790\u8fc7\u7a0b\uff1a<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7406\u89e3\u7528\u6237\u610f\u56fe<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u8f93\u5165\uff1a\u201c\u6253\u5f00LED\u201d \u2192 \u8bed\u4e49\u89e3\u6790\u4e3a\u201c\u9700\u8981\u5f00\u542f\u67d0\u4e2a\u7167\u660e\u8bbe\u5907\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5339\u914d\u53ef\u7528\u5de5\u5177<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u67e5\u770b\u00a0<code>tools<\/code>\u00a0\u5217\u8868\uff0c\u53d1\u73b0\u6709\u4e00\u4e2a\u53eb\u00a0<code>controlLEDOnOFF<\/code>\u00a0\u7684\u51fd\u6570\uff0c\u63cf\u8ff0\u662f\u201c\u63a7\u5236LED\u5f00\u5173\u201d\u3002<\/li>\n\n\n\n<li>\u5224\u65ad\uff1a\u8be5\u5de5\u5177\u80fd\u5b8c\u6210\u7528\u6237\u9700\u6c42\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u751f\u6210\u5408\u6cd5\u53c2\u6570<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u6839\u636e\u00a0<code>parameters<\/code>\u00a0\u4e2d\u7684\u00a0<code>enum: [\"on\", \"off\"]<\/code>\uff0c\u786e\u5b9a\u53ea\u80fd\u9009\u00a0<code>\"on\"<\/code>\u3002<\/li>\n\n\n\n<li>\u4e0d\u4f1a\u751f\u6210\u00a0<code>\"open\"<\/code>\u3001<code>\"start\"<\/code>\u00a0\u7b49\u975e\u6cd5\u503c\uff08\u56e0\u4e3a\u88ab\u00a0<code>parameters<\/code>\u00a0\u4e2d\u7684\u00a0<code>enum<\/code> \u9650\u5236\u4e86\u53ea\u80fd\u4f7f\u7528<code>\"on\", \"off\"<\/code>\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u51b3\u5b9a\u8f93\u51fa\u5f62\u5f0f<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u56e0\u4e3a\u00a0<code>tool_choice<\/code>\u00a0\u662f\u00a0<code>\"auto\"<\/code>\uff0c\u4e14\u5339\u914d\u6210\u529f\uff0c\u6240\u4ee5<strong>\u4e0d\u8fd4\u56de\u6587\u5b57<\/strong>\uff0c\u800c\u662f\u8fd4\u56de\u4e00\u4e2a<strong>\u5de5\u5177\u8c03\u7528\u6307\u4ee4<\/strong>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e09\u9636\u6bb5\uff1aESP32 \u5982\u4f55\u5904\u7406 AI \u7684\u54cd\u5e94\u5e76\u6267\u884c\u76f8\u5e94\u64cd\u4f5c\uff1f<\/h2>\n\n\n\n<p>\u5728\u524d\u4e24\u6b65\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u5b8c\u6210\u4e86\u6307\u4ee4\u7684\u53d1\u9001\u548cAI\u5e73\u53f0\u7684\u5206\u6790\u3002\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u6765\u770b\u770bESP32\u662f\u5982\u4f55\u63a5\u6536\u5e76\u5904\u7406AI\u8fd4\u56de\u7684\u6307\u4ee4\u7684\u3002<\/p>\n\n\n\n<p>\u5f53AI\u5e73\u53f0\u5b8c\u6210\u5206\u6790\u540e\uff0c\u5b83\u4f1a\u5411ESP32\u8fd4\u56de\u4e00\u4e2a\u7ed3\u6784\u5316\u7684\u54cd\u5e94\u3002\u4e3a\u4e86\u4fbf\u4e8e\u5927\u5bb6\u7406\u89e3\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5316\u7248\u672c\u7684AI\u54cd\u5e94\uff0c\u5b9e\u9645AI\u5e73\u53f0\u7684\u54cd\u5e94\u5185\u5bb9\u8981\u66f4\u52a0\u4e30\u5bcc\u548c\u590d\u6742\uff0c\u4f46\u662f\u8003\u8651\u5230\u6211\u4eec\u8fd9\u4e2a\u6559\u7a0b\u6587\u7ae0\u9762\u5411\u521d\u5b66\u8005\uff0c\u6240\u4ee5\u5148\u7701\u7565\u6389\u4e00\u90e8\u5206\u5185\u5bb9\uff0c\u800c\u53ea\u662f\u5c06\u6700\u91cd\u8981\u7684\u90e8\u5206\u6458\u51fa\u6765\u8fdb\u884c\u8bb2\u89e3\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"choices\": [\n    {\n      \"finish_reason\": \"tool_calls\",\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"\",\n        \"tool_calls\": &#91;\n          {\n            \"function\": {\n              \"name\": \"controlLEDOnOFF\",\n              \"arguments\": \"{\\\"action\\\": \\\"on\\\"}\"\n            }\n          }\n        &#93;\n      }\n    }\n  ]\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">choices<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">[<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">finish_reason<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_calls<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">message<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">role<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">assistant<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">content<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_calls<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">controlLEDOnOFF<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">arguments<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">{<\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">: <\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">on<\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>ESP32\u6536\u5230\u8fd9\u4e2a\u54cd\u5e94\u540e\uff0c\u4f1a\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u5904\u7406\uff1a<\/p>\n\n\n\n<p>\u9996\u5148\uff0cESP32\u4f1a\u68c0\u67e5\u54cd\u5e94\u4e2d\u7684<code>finish_reason<\/code>\u5b57\u6bb5\u3002\u5f53\u8fd9\u4e2a\u5b57\u6bb5\u7684\u503c\u4e3a<code>\"tool_calls\"<\/code>\u65f6\uff0cESP32\u5c31\u77e5\u9053AI\u5df2\u7ecf\u751f\u6210\u4e86\u4e00\u4e2a\u5de5\u5177\u8c03\u7528\u6307\u4ee4\uff0c\u800c\u4e0d\u662f\u666e\u901a\u7684\u6587\u672c\u56de\u590d\u3002<\/p>\n\n\n\n<p>\u63a5\u7740\uff0cESP32\u4f1a\u4ece<code>tool_calls<\/code>\u6570\u7ec4\u4e2d\u63d0\u53d6\u5173\u952e\u4fe1\u606f\u3002\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0cESP32\u4f1a\u627e\u5230\u7b2c\u4e00\u4e2a\uff08\u4e5f\u662f\u552f\u4e00\u4e00\u4e2a\uff09\u5de5\u5177\u8c03\u7528\uff0c\u5e76\u4ece\u4e2d\u83b7\u53d6\u4e24\u4e2a\u91cd\u8981\u4fe1\u606f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u51fd\u6570\u540d\u79f0<\/strong>\uff1a\u901a\u8fc7<code>function.name<\/code>\u5b57\u6bb5\uff0cESP32\u5f97\u77e5\u9700\u8981\u8c03\u7528\u540d\u4e3a<code>controlLEDOnOFF<\/code>\u7684\u51fd\u6570<\/li>\n\n\n\n<li><strong>\u51fd\u6570\u53c2\u6570<\/strong>\uff1a\u901a\u8fc7<code>function.arguments<\/code>\u5b57\u6bb5\uff0cESP32\u83b7\u5f97\u4e00\u4e2aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32<code>{\"action\": \"on\"}<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u7136\u540e\uff0cESP32\u4f1a\u5bf9\u53c2\u6570\u5b57\u7b26\u4e32\u8fdb\u884c\u89e3\u6790\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a\u53ef\u64cd\u4f5c\u7684\u6570\u636e\u7ed3\u6784\u3002\u901a\u8fc7\u89e3\u6790\uff0cESP32\u80fd\u591f\u63d0\u53d6\u51fa\u5177\u4f53\u7684\u53c2\u6570\u503c\uff1a<code>action<\/code>\u7684\u503c\u4e3a<code>\"on\"<\/code>\u3002<\/p>\n\n\n\n<p>\u6700\u540e\uff0cESP32\u4f1a\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u6267\u884c\u76f8\u5e94\u7684\u786c\u4ef6\u64cd\u4f5c\u3002\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u7531\u4e8e<code>action<\/code>\u7684\u503c\u662f<code>\"on\"<\/code>\uff0cESP32\u5c31\u4f1a\u6267\u884c\u6253\u5f00LED\u7684\u64cd\u4f5c\u3002\u5982\u679c<code>action<\/code>\u7684\u503c\u662f<code>\"off\"<\/code>\uff0c\u5219\u4f1a\u6267\u884c\u5173\u95edLED\u7684\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0cESP32\u6210\u529f\u5730\u5c06AI\u751f\u6210\u7684\u7ed3\u6784\u5316\u6307\u4ee4\u8f6c\u5316\u4e3a\u5b9e\u9645\u7684\u786c\u4ef6\u63a7\u5236\u52a8\u4f5c\uff0c\u5b9e\u73b0\u4e86&#8221;\u8ba9AI\u63a7\u5236\u7269\u7406\u8bbe\u5907&#8221;\u7684\u76ee\u6807\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>\u8865\u5145\u8bf4\u660e\uff1a\u5b8c\u6574\u54cd\u5e94\u4e2d\u7684\u5176\u4ed6\u91cd\u8981\u5b57\u6bb5<\/strong><\/p>\n\n\n\n<p>\u5728\u524d\u9762\u7684\u8bb2\u89e3\u4e2d\uff0c\u6211\u4eec\u805a\u7126\u4e8eESP32\u5982\u4f55\u4eceAI\u54cd\u5e94\u4e2d\u63d0\u53d6\u5173\u952e\u7684\u51fd\u6570\u8c03\u7528\u4fe1\u606f\uff08\u5982\u51fd\u6570\u540d\u548c\u53c2\u6570\uff09\uff0c\u5e76\u636e\u6b64\u63a7\u5236\u786c\u4ef6\u3002\u7136\u800c\uff0c\u5b9e\u9645\u4ece\u963f\u91cc\u4e91\u767e\u70bc\u5e73\u53f0\u8fd4\u56de\u7684\u5b8c\u6574JSON\u54cd\u5e94\u8fd8\u5305\u542b\u8bb8\u591a\u5176\u4ed6\u5b57\u6bb5\uff0c\u8fd9\u4e9b\u5b57\u6bb5\u867d\u7136\u4e0d\u76f4\u63a5\u5f71\u54cdLED\u7684\u5f00\u5173\u52a8\u4f5c\uff0c\u4f46\u5bf9\u4e8e\u6784\u5efa\u5065\u58ee\u3001\u53ef\u7ef4\u62a4\u548c\u53ef\u8c03\u8bd5\u7684\u7cfb\u7edf\u975e\u5e38\u6709\u4ef7\u503c\u3002\u4e0b\u9762\u6211\u4eec\u5217\u51fa\u5b9e\u9645\u4ece\u963f\u91cc\u4e91\u767e\u70bc\u5e73\u53f0\u8fd4\u56de\u7684\u5b8c\u6574JSON\u54cd\u5e94\u5e76\u4e14\u5bf9\u4ee5\u4e0a\u8bb2\u89e3\u4e2d\u6ca1\u6709\u6d89\u53ca\u7684\u5185\u5bb9\u8fdb\u884c\u8865\u5145\u8bf4\u660e\uff0c\u5e2e\u52a9\u4f60\u66f4\u5168\u9762\u5730\u7406\u89e3\u6574\u4e2a\u901a\u4fe1\u8fc7\u7a0b\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"choices\": [\n    {\n      \"finish_reason\": \"tool_calls\",\n      \"index\": 0,\n      \"message\": {\n        \"content\": \"\",\n        \"role\": \"assistant\",\n        \"tool_calls\": &#91;\n          {\n            \"function\": {\n              \"arguments\": \"{\\\"action\\\": \\\"on\\\"}\",\n              \"name\": \"controlLEDOnOFF\"\n            },\n            \"id\": \"call_79fb27a337534b0fa58147\",\n            \"index\": 0,\n            \"type\": \"function\"\n          }\n        &#93;\n      }\n    }\n  ],\n  \"created\": 1776425906,\n  \"id\": \"chatcmpl-7fc1186d-a768-95c1-845c-5f9d32e89951\",\n  \"model\": \"qwen-flash\",\n  \"object\": \"chat.completion\",\n  \"usage\": {\n    \"completion_tokens\": 21,\n    \"prompt_tokens\": 177,\n    \"prompt_tokens_details\": {\n      \"cached_tokens\": 0\n    },\n    \"total_tokens\": 198\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">choices<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">[<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">finish_reason<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_calls<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">message<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">content<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">role<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">assistant<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">tool_calls<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">arguments<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">{<\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">action<\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">: <\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">on<\/span><span style=\"color: #EBCB8B\">\\&quot;<\/span><span style=\"color: #A3BE8C\">}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">              <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">name<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">controlLEDOnOFF<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            }<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">id<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">call_79fb27a337534b0fa58147<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">index<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">type<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">function<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">          }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #ECEFF4\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">],<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">created<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">1776425906<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">id<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">chatcmpl-7fc1186d-a768-95c1-845c-5f9d32e89951<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">model<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">qwen-flash<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">object<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">chat.completion<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">usage<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">completion_tokens<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">21<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">prompt_tokens<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">177<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">prompt_tokens_details<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">cached_tokens<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">},<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">total_tokens<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">: <\/span><span style=\"color: #B48EAD\">198<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>tool_calls<\/code>\u00a0\u4e2d\u7684\u5143\u6570\u636e\u5b57\u6bb5<\/strong><br>\u5728\u6bcf\u4e2a\u5de5\u5177\u8c03\u7528\u5bf9\u8c61\u4e2d\uff0c\u9664\u4e86\u00a0<code>function.name<\/code>\u00a0\u548c\u00a0<code>function.arguments<\/code>\u00a0\u4e4b\u5916\uff0c\u8fd8\u6709\u51e0\u4e2a\u8f85\u52a9\u5b57\u6bb5\uff1a\n<ul class=\"wp-block-list\">\n<li><strong><code>id<\/code><\/strong>\uff1a\u4f8b\u5982\u00a0<code>\"call_79fb27a337534b0fa58147\"<\/code>\uff0c\u8fd9\u662f\u8be5\u6b21\u5de5\u5177\u8c03\u7528\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002\u5982\u679c\u4f60\u7684\u5e94\u7528\u9700\u8981\u8ffd\u8e2a\u67d0\u4e2a\u5de5\u5177\u8c03\u7528\uff0c\u8fd9\u4e2aID\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5c06\u8bf7\u6c42\u4e0e\u54cd\u5e94\u51c6\u786e\u5339\u914d\u3002<\/li>\n\n\n\n<li><strong><code>index<\/code><\/strong>\uff1a\u8868\u793a\u8be5\u5de5\u5177\u8c03\u7528\u5728\u5217\u8868\u4e2d\u7684\u4f4d\u7f6e\uff08\u4ece0\u5f00\u59cb\uff09\u3002\u5f53AI\u4e00\u6b21\u751f\u6210\u591a\u4e2a\u5de5\u5177\u8c03\u7528\u65f6\uff08\u4f8b\u5982\u540c\u65f6\u6253\u5f00\u706f\u548c\u8c03\u8282\u98ce\u6247\uff09\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u00a0<code>index<\/code>\u00a0\u6765\u6309\u987a\u5e8f\u5904\u7406\u5b83\u4eec\u3002<\/li>\n\n\n\n<li><strong><code>type<\/code><\/strong>\uff1a\u660e\u786e\u6307\u51fa\u8fd9\u662f\u4e00\u4e2a\u00a0<code>\"function\"<\/code>\u00a0\u7c7b\u578b\u7684\u5de5\u5177\u8c03\u7528\uff0c\u672a\u6765\u5982\u679c\u5e73\u53f0\u652f\u6301\u5176\u4ed6\u7c7b\u578b\uff0c\u8fd9\u4e2a\u5b57\u6bb5\u5c06\u6709\u52a9\u4e8e\u533a\u5206\u5904\u7406\u903b\u8f91\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u9876\u5c42\u54cd\u5e94\u5143\u4fe1\u606f<\/strong><br>\u54cd\u5e94\u7684\u9876\u5c42\u5305\u542b\u4e00\u4e9b\u63cf\u8ff0\u6574\u4e2aAI\u751f\u6210\u8fc7\u7a0b\u7684\u5143\u6570\u636e\uff1a\n<ul class=\"wp-block-list\">\n<li><strong><code>id<\/code><\/strong>\uff1a\u5982\u00a0<code>\"chatcmpl-7fc1186d-a768-95c1-845c-5f9d32e89951\"<\/code>\uff0c\u8fd9\u662f\u672c\u6b21\u804a\u5929\u5b8c\u6210\uff08chat completion\uff09\u7684\u552f\u4e00ID\uff0c\u53ef\u7528\u4e8e\u65e5\u5fd7\u8bb0\u5f55\u6216\u95ee\u9898\u6392\u67e5\u3002<\/li>\n\n\n\n<li><strong><code>created<\/code><\/strong>\uff1a\u65f6\u95f4\u6233\uff08Unix\u683c\u5f0f\uff09\uff0c\u8868\u793a\u54cd\u5e94\u751f\u6210\u7684\u65f6\u95f4\u3002\u8fd9\u5bf9\u4e8e\u8c03\u8bd5\u5ef6\u8fdf\u95ee\u9898\u6216\u5206\u6790\u7cfb\u7edf\u6027\u80fd\u5f88\u6709\u5e2e\u52a9\u3002<\/li>\n\n\n\n<li><strong><code>model<\/code><\/strong>\uff1a\u6307\u660e\u6240\u4f7f\u7528\u7684AI\u6a21\u578b\uff08\u8fd9\u91cc\u662f\u00a0<code>\"qwen-flash\"<\/code>\uff09\u3002\u8fd9\u4e2a\u5b57\u6bb5\u53ef\u4ee5\u7528\u4e8e\u786e\u8ba4\u5f53\u524d\u751f\u6548\u7684\u6a21\u578b\u3002<\/li>\n\n\n\n<li><strong><code>object<\/code><\/strong>\uff1a\u56fa\u5b9a\u4e3a\u00a0<code>\"chat.completion\"<\/code>\uff0c\u8868\u660e\u8fd9\u662f\u4e00\u4e2a\u6807\u51c6\u7684\u804a\u5929\u5b8c\u6210\u54cd\u5e94\uff0c\u7b26\u5408OpenAI\u517c\u5bb9\u7684API\u89c4\u8303\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong><code>usage<\/code>\u00a0\u5b57\u6bb5\uff1a\u7528\u91cf\u7edf\u8ba1<\/strong><br>\u8fd9\u90e8\u5206\u63d0\u4f9b\u4e86\u672c\u6b21\u8bf7\u6c42\u7684\u8d44\u6e90\u6d88\u8017\u8be6\u60c5\uff1a<ul><li><strong><code>prompt_tokens<\/code><\/strong>\uff1a\u8f93\u5165\u63d0\u793a\uff08\u5305\u62ec\u7cfb\u7edf\u6307\u4ee4\u3001\u7528\u6237\u6d88\u606f\u548c\u5de5\u5177\u5b9a\u4e49\uff09\u6d88\u8017\u7684token\u6570\u91cf\uff08177\u4e2a\uff09\u3002<\/li><li><strong><code>completion_tokens<\/code><\/strong>\uff1aAI\u751f\u6210\u7684\u54cd\u5e94\uff08\u5373\u5de5\u5177\u8c03\u7528\u90e8\u5206\uff09\u6d88\u8017\u7684token\u6570\u91cf\uff0821\u4e2a\uff09\u3002<\/li><li><strong><code>total_tokens<\/code><\/strong>\uff1a\u603btoken\u6570\uff08198 = 177 + 21\uff09\u3002<\/li><\/ul>\u8fd9\u4e9b\u6570\u636e\u5bf9\u4e8e\u6210\u672c\u63a7\u5236\u81f3\u5173\u91cd\u8981\u3002\u5927\u591a\u6570AI\u5e73\u53f0\u6309token\u8ba1\u8d39\uff0c\u901a\u8fc7\u76d1\u63a7\u00a0<code>usage<\/code>\u00a0\u5b57\u6bb5\uff0c\u4f60\u53ef\u4ee5\u4f30\u7b97\u670d\u52a1\u6210\u672c\uff0c\u5e76\u4f18\u5316\u63d0\u793a\u8bcd\u4ee5\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684token\u6d88\u8017\uff08\u4f8b\u5982\u7cbe\u7b80\u5de5\u5177\u63cf\u8ff0\uff09\u3002<\/li>\n\n\n\n<li><strong><code>finish_reason<\/code>\u00a0\u7684\u66f4\u591a\u53ef\u80fd\u503c<\/strong><br>\u867d\u7136\u672c\u4f8b\u4e2d\u00a0<code>finish_reason<\/code>\u00a0\u662f\u00a0<code>\"tool_calls\"<\/code>\uff0c\u4f46\u5b9e\u9645\u5e94\u7528\u4e2d\u5b83\u8fd8\u53ef\u80fd\u662f\uff1a<ul><li><code>\"stop\"<\/code>\uff1aAI\u6b63\u5e38\u7ed3\u675f\u56de\u590d\uff08\u65e0\u5de5\u5177\u8c03\u7528\uff09\u3002<\/li><li><code>\"length\"<\/code>\uff1a\u54cd\u5e94\u8fbe\u5230\u6700\u5927\u957f\u5ea6\u9650\u5236\u3002<\/li><li><code>\"content_filter\"<\/code>\uff1a\u5185\u5bb9\u88ab\u5b89\u5168\u8fc7\u6ee4\u5668\u62e6\u622a\u3002<\/li><\/ul>\u5728\u4ee3\u7801\u4e2d\uff0c\u5efa\u8bae\u59cb\u7ec8\u68c0\u67e5\u00a0<code>finish_reason<\/code>\u00a0\u7684\u503c\uff0c\u4ee5\u786e\u4fdd\u53ea\u5728\u9884\u671f\u60c5\u51b5\u4e0b\u5904\u7406\u5de5\u5177\u8c03\u7528\uff0c\u907f\u514d\u56e0\u5f02\u5e38\u7ec8\u6b62\u5bfc\u81f4\u89e3\u6790\u9519\u8bef\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5b9e\u8df5\u5efa\u8bae\">\u5b9e\u8df5\u5efa\u8bae<\/h3>\n\n\n\n<p>\u5c3d\u7ba1\u521d\u5b66\u8005\u6559\u7a0b\u53ef\u4ee5\u7b80\u5316\u54cd\u5e94\u7ed3\u6784\uff0c\u4f46\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\uff0c\u5efa\u8bae\u4f60\u7684ESP32\u56fa\u4ef6\u81f3\u5c11\u505a\u4ee5\u4e0b\u589e\u5f3a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u76d1\u63a7\u00a0<code>usage<\/code><\/strong>\uff1a\u8bbe\u7f6etoken\u7528\u91cf\u544a\u8b66\uff0c\u9632\u6b62\u610f\u5916\u9ad8\u989d\u8d39\u7528\u3002<\/li>\n\n\n\n<li><strong>\u5904\u7406\u591a\u79cd\u00a0<code>finish_reason<\/code><\/strong>\uff1a\u589e\u52a0\u9519\u8bef\u5904\u7406\u5206\u652f\uff0c\u63d0\u5347\u7cfb\u7edf\u9c81\u68d2\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u901a\u8fc7\u7406\u89e3\u8fd9\u4e9b\u989d\u5916\u5b57\u6bb5\uff0c\u4f60\u4e0d\u4ec5\u80fd\u6b63\u786e\u63a7\u5236LED\uff0c\u8fd8\u80fd\u6784\u5efa\u4e00\u4e2a\u751f\u4ea7\u7ea7\u7684\u3001\u53ef\u76d1\u63a7\u3001\u53ef\u6269\u5c55\u7684AIoT\uff08\u4eba\u5de5\u667a\u80fd\u7269\u8054\u7f51\uff09\u5e94\u7528\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u603b\u7ed3<\/h2>\n\n\n\n<p>Tool Calls\uff08\u5de5\u5177\u8c03\u7528\uff09 \u8ba9 ESP32 \u9879\u76ee\u5177\u5907\u4e86\u201c\u542c\u61c2\u4eba\u8bdd\u201d\u7684\u80fd\u529b\uff0c\u800c\u4f60\u4f5c\u4e3a\u5f00\u53d1\u8005\uff0c\u53ea\u9700\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u544a\u8bc9 AI \u4f60\u80fd\u505a\u4ec0\u4e48<\/strong>\uff08\u901a\u8fc7\u00a0<code>tools<\/code>\u00a0\u5b9a\u4e49\uff09\uff0c<\/li>\n\n\n\n<li><strong>\u6267\u884c AI \u4e0b\u8fbe\u7684\u6307\u4ee4<\/strong>\uff08\u89e3\u6790\u00a0<code>tool_calls<\/code>\u00a0\u5e76\u64cd\u4f5c GPIO\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u5927\u5927\u964d\u4f4e\u4e86\u81ea\u7136\u8bed\u8a00\u4ea4\u4e92\u7684\u5f00\u53d1\u95e8\u69db\uff0c\u8ba9\u4f60\u4e13\u6ce8\u4e8e\u786c\u4ef6\u63a7\u5236\uff0c\u800c\u4e0d\u662f\u590d\u6742\u7684\u8bed\u8a00\u7406\u89e3\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\uff0c\u5f53\u4f60\u770b\u5230\u793a\u4f8b\u7a0b\u5e8f\u4e2d\u7684 JSON \u6784\u9020\u3001HTTP \u8bf7\u6c42\u3001\u54cd\u5e94\u89e3\u6790\u4ee3\u7801\u65f6\uff0c\u5c31\u80fd\u6e05\u695a\u77e5\u9053\uff1a<strong>\u6bcf\u4e00\u884c\u90fd\u662f\u5728\u5b9e\u73b0\u8fd9\u4e2a\u201cAI \u6307\u4ee4 \u2192 \u8bbe\u5907\u52a8\u4f5c\u201d\u7684\u6865\u6881<\/strong>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5bfc\u822a\u680f\uff1a\u9996\u9875 \/ AI\u6559\u7a0b\u76ee\u5f55 \/ AI\u521b\u5ba2\u9879\u76ee\u5f00\u53d1\u6559\u7a0b\u76ee\u5f55 \/ \u7b2c1\u7bc7 \u57fa\u7840\u77e5\u8bc6\u7bc7 \/ AID101-1-3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":80,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-685","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/pages\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":16,"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/pages\/685\/revisions"}],"predecessor-version":[{"id":752,"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/pages\/685\/revisions\/752"}],"up":[{"embeddable":true,"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/pages\/80"}],"wp:attachment":[{"href":"http:\/\/ai.taichi-maker.com\/index.php\/wp-json\/wp\/v2\/media?parent=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}