{"id":180,"date":"2025-01-09T15:22:40","date_gmt":"2025-01-09T07:22:40","guid":{"rendered":"https:\/\/www.aitwg.com\/?p=180"},"modified":"2025-03-23T15:26:56","modified_gmt":"2025-03-23T07:26:56","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-cloudflare-%e5%85%8d%e8%b2%bb%e9%83%a8%e7%bd%b2-700-%e5%84%84%e5%8f%83%e6%95%b8%e7%9a%84-llama-3-3-%e6%a8%a1%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.aitwg.com\/?p=180","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 Cloudflare \u514d\u8cbb\u90e8\u7f72 700 \u5104\u53c3\u6578\u7684 Llama 3.3 \u6a21\u578b"},"content":{"rendered":"\n<h6 class=\"wp-block-heading\">\u60f3\u9ad4\u9a57\u5927\u6a21\u578b\u537b\u53d7\u9650\u65bc\u96fb\u8166\u6027\u80fd\uff1f<\/h6>\n\n\n\n<h6 class=\"wp-block-heading\">\u5728\u672c\u5730\u90e8\u7f72\u50cf Llama \u7b49\u6a21\u578b\u6642\uff0c\u901a\u5e38\u53ea\u80fd\u904b\u884c\u8f03\u5c0f\u898f\u6a21\u7684\u6a21\u578b\uff0c\u5982 1.5B\uff0815 \u5104\u53c3\u6578\uff09\u30017B\uff0870 \u5104\u53c3\u6578\uff09\u6216 14B\uff08140 \u5104\u53c3\u6578\uff09\uff0c\u56e0\u70ba\u66f4\u5927\u7684\u6a21\u578b\u5c0d\u786c\u9ad4\u8981\u6c42\u6975\u9ad8\u3002<\/h6>\n\n\n\n<h6 class=\"wp-block-heading\">\u73fe\u5728\uff0c\u60a8\u53ef\u4ee5\u5229\u7528 Cloudflare Workers AI \u5728\u7dda\u90e8\u7f72 700 \u5104\u53c3\u6578\u7684 Llama 3.3 \u5927\u6a21\u578b\uff0c\u4e26\u901a\u904e\u516c\u958b\u7db2\u5740\u8a2a\u554f\u3002\u8a72\u670d\u52d9\u7684 API \u63a5\u53e3\u76f8\u5bb9\u65bc OpenAI\uff0c\u8b93\u60a8\u50cf\u4f7f\u7528 OpenAI API \u4e00\u6a23\u4fbf\u6377\u3002\u5982\u679c\u6709\u8208\u8da3\uff0c\u4e0d\u59a8\u8a66\u8a66\u770b\uff01<\/h6>\n\n\n\n<!--more-->\n\n\n\n<h6 class=\"wp-block-heading\">\u76ee\u524d\u5be6\u4f5c\u7684\u7c21\u6613\u7248\u672c\u53ea\u8655\u7406 \/v1\/chat\/completions \u7684 Prompt, \u53ef\u4ee5\u7528\u5728\u50c5\u6c89\u6d78\u5f0f\u7ffb\u8b6f\u7b49\u7c21\u55ae\u7684 API \u8abf\u7528\uff0c<\/h6>\n\n\n\n<h6 class=\"wp-block-heading\">\u76ee\u524d\u4e26\u4e0d\u652f\u63f4\u8907\u96dc\u7684 Chat \u6a21\u5f0f\u3002<\/h6>\n\n\n\n<p>\u900f\u904e CURL \u4f7f\u7528<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>$curl -X POST https:\/\/my.aitwg.com\/v1\/chat\/completions&nbsp; \\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-H &#8220;Content-Type: application\/json&#8221; \\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-H &#8220;Authorization: Bearer YOURKEY&#8221; \\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-d &#8216;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;model&#8221;: &#8220;llama-3.3&#8221;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;prompt&#8221;: &#8220;\u8acb\u63a8\u85a6\u53f0\u5317\u7f8e\u98df&#8221;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;max_tokens&#8221;: 200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&#8217;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5728\u6c89\u6d78\u5f0f\u7ffb\u8b6f\u4f7f\u7528<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg2x0MlL3WTMHfVarKBCWVYlVE1wSDUf2TymogK8SBEMFHAspXejm4p-1wODu-IqQ4s9IJGwN6iuZa5hNQ2x5t_ef3YnA05JJM6vjNPBhvnGxI9QUWQFa3IH0aGQ6hNIAceeGgBpsUeywJKuGWH_d1fJazj1qjt55hFb_-2U5epEu0cT3Z7bWXBWYGl1w\/s1514\/Screenshot%202025-01-09%20at%201.01.46%E2%80%AFPM.png\"><img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg2x0MlL3WTMHfVarKBCWVYlVE1wSDUf2TymogK8SBEMFHAspXejm4p-1wODu-IqQ4s9IJGwN6iuZa5hNQ2x5t_ef3YnA05JJM6vjNPBhvnGxI9QUWQFa3IH0aGQ6hNIAceeGgBpsUeywJKuGWH_d1fJazj1qjt55hFb_-2U5epEu0cT3Z7bWXBWYGl1w\/w400-h158\/Screenshot%202025-01-09%20at%201.01.46%E2%80%AFPM.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiaXvVdtm-sZjVFFApFE-Fk8iGXYceTkvWFYFifSxnxuNU3A26Yf8c8wbBaAQKw3cJvOlRbERYmn4VriduGJNW3DZK5K49FH05lF-TkVwr09U7mIoy1fT3YTzTiXDLqf_XgT5ZqMLT1Ly-_8Mam89W93noO6QWVpPStAKwgJzTb49yfTJVaZQ1GvwGGSA\/s1510\/Screenshot%202025-01-09%20at%201.02.04%E2%80%AFPM.png\"><img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiaXvVdtm-sZjVFFApFE-Fk8iGXYceTkvWFYFifSxnxuNU3A26Yf8c8wbBaAQKw3cJvOlRbERYmn4VriduGJNW3DZK5K49FH05lF-TkVwr09U7mIoy1fT3YTzTiXDLqf_XgT5ZqMLT1Ly-_8Mam89W93noO6QWVpPStAKwgJzTb49yfTJVaZQ1GvwGGSA\/w400-h66\/Screenshot%202025-01-09%20at%201.02.04%E2%80%AFPM.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjehdPmnYuFWWkBIjK9GIInCx76Pl3vw-uel9V1B_5UhdLMi2idS0imORI9QYcyfir3zfQkiJuZWBenf_wGlOaE14th48rSIymbn0LwBIKhv7AQ7kTZUE82FNPb504R1BVh-93XNGHn6xZOGyOWhyYZCgDrqVZNZQdcOv7uhyphenhyphen_X8YZDRoGlnpm_2Xrrog\/s2648\/Screenshot%202025-01-09%20at%201.04.11%E2%80%AFPM.png\"><img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjehdPmnYuFWWkBIjK9GIInCx76Pl3vw-uel9V1B_5UhdLMi2idS0imORI9QYcyfir3zfQkiJuZWBenf_wGlOaE14th48rSIymbn0LwBIKhv7AQ7kTZUE82FNPb504R1BVh-93XNGHn6xZOGyOWhyYZCgDrqVZNZQdcOv7uhyphenhyphen_X8YZDRoGlnpm_2Xrrog\/w400-h264\/Screenshot%202025-01-09%20at%201.04.11%E2%80%AFPM.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6e96\u5099\u5de5\u4f5c\uff1a\u8a3b\u518a Cloudflare \u4e26\u7d81\u5b9a\u529f\u80fd\u8b8a\u6578\u540d\u7a31<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u5c1a\u672a\u64c1\u6709 Cloudflare \u5e33\u865f\uff0c\u60a8\u53ef\u4ee5\u514d\u8cbb\u8a3b\u518a\u3002<\/p>\n\n\n\n<p>\u6253\u958b<a href=\"https:\/\/dash.cloudflare.com\/\"> Cloudflare \u5b98\u65b9\u7db2\u7ad9<\/a>\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8a3b\u518a\u4e26\u767b\u5165\u60a8\u7684\u5e33\u865f\u3002<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9a5f\u4e00\uff1a\u5275\u5efa Workers AI<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u9032\u5165 Workers AI \u7ba1\u7406\u9801\u9762\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5728 Cloudflare \u63a7\u5236\u53f0\u5de6\u5074\u9078\u55ae\u4e2d\uff0c\u627e\u5230 <strong>AI<\/strong> -> <strong>Workers AI<\/strong>\uff0c\u9ede\u64ca <strong>\u5f9e Worker \u7bc4\u672c\u5275\u5efa<\/strong>\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5275\u5efa Worker\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u9ede\u64ca <strong>\u5275\u5efa Worker<\/strong>\uff0c\u8f38\u5165\u4e00\u500b\u82f1\u6587\u5b57\u6bcd\u7d44\u6210\u7684\u540d\u7a31\uff0c\u9019\u540d\u7a31\u5c07\u6210\u70ba\u60a8\u7684 Worker \u9810\u8a2d\u529f\u80fd\u8b8a\u6578\u540d\u7a31\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u90e8\u7f72 Worker\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u9ede\u64ca\u53f3\u4e0b\u89d2 <strong>\u90e8\u7f72<\/strong> \u6309\u9215\uff0c\u5b8c\u6210 Worker \u7684\u57fa\u790e\u5275\u5efa\u3002<\/li>\n\n\n\n<li><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj_ilambqXAQsjrMNnuFeYfOCjsy5zFucVKLK4Q-fyYjMJjerpKbHfuuqEN2956EudIWuxllGvnrQKPDAJ5Mwd4hbjIGGyJzJzUx8m7qaQjHASLKYsav6Jz2vlvvUoQuTcvYn4JNcAUvqTEWJC_ZHhlUFraVOyNE8r-naRrAmQKS1KiWCP8a56A4WWcYg\/s2608\/Screenshot%202025-01-09%20at%203.18.23%E2%80%AFPM.png\"><\/a><br><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9a5f\u4e8c\uff1a\u4fee\u6539\u4ee3\u78bc\uff0c\u90e8\u7f72 Llama 3.3 70B \u6a21\u578b<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u9032\u5165\u4ee3\u78bc\u7de8\u8f2f\u5668\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5275\u5efa Worker \u5f8c\uff0c\u9032\u5165\u4ee3\u78bc\u7de8\u8f2f\u9801\u9762\uff0c\u9ede\u64ca <strong>\u7de8\u8f2f\u4ee3\u78bc<\/strong>\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u6e05\u7a7a\u9810\u8a2d\u4ee3\u78bc\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u522a\u9664\u4ee3\u78bc\u7de8\u8f2f\u5668\u4e2d\u6240\u6709\u9810\u8a2d\u5167\u5bb9\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u8cbc\u4e0a\u4ee5\u4e0b\u4ee3\u78bc\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u4ee5\u4e0b\u4ee3\u78bc\u57fa\u65bc <strong>Llama-3.3-70B-Instruct-FP8-Fast<\/strong> \u6a21\u578b\uff0c\u9019\u662f\u76ee\u524d\u6548\u679c\u6700\u4f73\u7684 700 \u5104\u53c3\u6578\u6a21\u578b\u4e4b\u4e00\uff1a<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>const API_KEY='&lt;YOUR_KEY&gt;&#8217;;export default {&nbsp;&nbsp;async fetch(request, env) {&nbsp;&nbsp;&nbsp;&nbsp;const tasks = [];&nbsp;&nbsp;&nbsp;&nbsp;let url = new URL(request.url);&nbsp;&nbsp;&nbsp;&nbsp;const path = url.pathname;<br>&nbsp;&nbsp;&nbsp;&nbsp;const authHeader = request.headers.get(&#8220;authorization&#8221;) || request.headers.get(&#8220;x-api-key&#8221;);&nbsp;&nbsp;&nbsp;&nbsp;const apiKey = authHeader?.startsWith(&#8220;Bearer &#8220;)&nbsp; ? authHeader.slice(7)&nbsp; : null;<br>&nbsp;&nbsp;&nbsp;&nbsp;if (API_KEY &amp;&amp; apiKey !== API_KEY) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return new Response(JSON.stringify({&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;error: {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message: &#8220;Invalid API key. Use &#8216;Authorization: Bearer your-api-key&#8217; header&#8221;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: &#8220;invalid_request_error&#8221;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;param: null,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code: &#8220;invalid_api_key&#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}), {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status: 401,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;headers: {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;Content-Type&#8221;: &#8220;application\/json&#8221;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;if (path === &#8220;\/v1\/chat\/completions&#8221;) {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const requestBody = await request.json();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ messages &#8211; chat style input&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let chat = {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messages: requestBody&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let response = await env.AI.run(&#8216;@cf\/meta\/llama-3.3-70b-instruct-fp8-fast&#8217;, requestBody);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let resdata={&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;choices:[{&#8220;message&#8221;:{&#8220;content&#8221;:response.response}}]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return Response.json(resdata);&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;if (path === &#8220;\/v1\/completions&#8221;) {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const requestBody = await request.json();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ messages &#8211; chat style input&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let chat = {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messages: requestBody&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let response = await env.AI.run(&#8216;@cf\/meta\/llama-3.3-70b-instruct-fp8-fast&#8217;, requestBody);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let resdata={&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;choices:[{&#8220;message&#8221;:{&#8220;content&#8221;:response.response}}]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return Response.json(resdata);&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;}};<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>\u90e8\u7f72\u4ee3\u78bc\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u8cbc\u4e0a\u4ee3\u78bc\u5f8c\uff0c\u9ede\u64ca <strong>\u90e8\u7f72<\/strong> \u6309\u9215\u5b8c\u6210\u767c\u5e03\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<h3 class=\"wp-block-heading\"><strong>\u6b65\u9a5f\u4e09\uff1a\u7d81\u5b9a\u81ea\u5b9a\u7db2\u57df\u540d\u7a31<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8fd4\u56de Worker \u8a2d\u5b9a\u9801\u9762\uff0c\u9032\u5165 <strong>\u8a2d\u7f6e<\/strong> -> <strong>\u7db2\u57df\u548c\u8def\u7531<\/strong>\u3002<\/li>\n\n\n\n<li>\u9ede\u64ca <strong>\u6dfb\u52a0\u57df<\/strong>\uff0c\u9078\u64c7 <strong>\u81ea\u5b9a\u7fa9\u7db2\u57df<\/strong>\uff0c\u8f38\u5165\u5df2\u5728 Cloudflare \u7d81\u5b9a\u7db2\u57df\u540d\u7a31\u3002<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9a5f\u56db\uff1a\u5728\u76f8\u5bb9 OpenAI \u7684\u5de5\u5177\u4e2d\u4f7f\u7528<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>API Key:<\/strong><strong><br><\/strong>\u4f7f\u7528\u4ee3\u78bc\u4e2d\u8a2d\u7f6e\u7684 API_KEY\uff08\u9ed8\u8a8d\u70ba &lt;YOUR_KEY>\uff09\u3002<\/li>\n\n\n\n<li><strong>API \u4f4d\u5740:<\/strong>\n<ul class=\"wp-block-list\">\n<li>https:\/\/&lt;YourDomain>\/v1\/chat\/completions<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u5728\u4efb\u4f55\u652f\u6301 OpenAI API \u7684\u5de5\u5177\u4e2d\uff0c\u8a2d\u7f6e\u60a8\u7684 API \u4f4d\u5740\u548c\u5bc6\u9470\uff0c\u5373\u53ef\u958b\u59cb\u4f7f\u7528\u3002\n<ul class=\"wp-block-list\">\n<li><strong>(\u76ee\u524d\u53ea\u652f\u63f4 Prompt, \u7121\u6cd5\u4f7f\u7528 Chat)<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6ce8\u610f\u4e8b\u9805<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u514d\u8cbb\u984d\u5ea6\uff1a<\/strong><strong><br><\/strong>Cloudflare Workers AI \u6bcf\u5929\u63d0\u4f9b 10,000 \u500b\u514d\u8cbb Token \u7528\u91cf\uff0c\u8d85\u51fa\u90e8\u5206\u6703\u6536\u8cbb\u3002<\/li>\n\n\n\n<li><strong>\u8cbb\u7528\u8a73\u60c5\uff1a<\/strong><strong><br><\/strong>\u8acb\u53c3\u8003<a href=\"https:\/\/developers.cloudflare.com\/workers-ai\/platform\/pricing\/\"> Cloudflare \u5b98\u65b9\u5b9a\u50f9\u9801\u9762<\/a>\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u900f\u904e Cloudflare \u5f37\u5927\u7684 GPU \u8cc7\u6e90\uff0c\u60a8\u5c07\u80fd\u6d41\u66a2\u5730\u9ad4\u9a57\u5927\u6a21\u578b\u7684\u9b45\u529b<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60f3\u9ad4\u9a57\u5927\u6a21\u578b\u537b\u53d7\u9650\u65bc\u96fb\u8166\u6027\u80fd\uff1f \u5728\u672c\u5730\u90e8\u7f72\u50cf Llama \u7b49\u6a21\u578b\u6642\uff0c\u901a\u5e38\u53ea\u80fd\u904b\u884c\u8f03\u5c0f\u898f\u6a21\u7684\u6a21\u578b\uff0c\u5982 1.5B\uff08&hellip;&nbsp;<a href=\"https:\/\/www.aitwg.com\/?p=180\" rel=\"bookmark\"><span class=\"screen-reader-text\">\u5982\u4f55\u4f7f\u7528 Cloudflare \u514d\u8cbb\u90e8\u7f72 700 \u5104\u53c3\u6578\u7684 Llama 3.3 \u6a21\u578b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.aitwg.com\/index.php?rest_route=\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aitwg.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aitwg.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aitwg.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aitwg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180"}],"version-history":[{"count":1,"href":"https:\/\/www.aitwg.com\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":181,"href":"https:\/\/www.aitwg.com\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions\/181"}],"wp:attachment":[{"href":"https:\/\/www.aitwg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aitwg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aitwg.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}