{"id":6656,"date":"2024-09-26T09:05:06","date_gmt":"2024-09-26T01:05:06","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=6656"},"modified":"2024-09-26T09:05:06","modified_gmt":"2024-09-26T01:05:06","slug":"buyaozaibendebuan","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/ja\/buyaozaibendebuan\/","title":{"rendered":"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01"},"content":{"rendered":"<blockquote><p>\u5207\u52ff\u63a5\u5165ONE-API\uff0c\u7533\u8bf7\u591a\u8d26\u53f7\u4f5c\u4e3a\u4e2d\u8f6c\u670d\u52a1\u8d1f\u8f7d\uff01\u4e00\u662f\u4e0d\u9053\u5fb7\uff0c\u4e8c\u662f\u5c01\u53f7\u3002<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>MistralAI\u63a8\u51faAPI\u514d\u8d39\u5957\u9910\u5df2\u6709\u51e0\u5929\uff0c\u4e00\u76f4\u72b9\u8c6b\u4e0d\u89c9\u662f\u5426\u53d1\u51fa\u6765\u7684\u539f\u56e0\u662fMistral\u5df2\u7ecf\u591a\u6b21\u5ffd\u60a0\u5f00\u53d1\u8005&#8230;8\u6708\u5e95\u672c\u6765\u8bf49\u6708\u4e0d\u8ba2\u9605\u8ba1\u5212\u5c31\u7528\u4e0d\u4e86\uff0c\u7ed3\u679c\u57289\u670817\u65e5\u76f4\u63a5\u5c06\u5927\u90e8\u5206\u6a21\u578b\u514d\u8d39\u5f00\u653e\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u76f4\u63a5\u8bbf\u95ee https:\/\/console.mistral.ai\/ \uff0c\u8fdb\u5165\u8ba1\u8d39\u9875\u9762\u5f00\u901a\u3002<\/p>\n<p>\u52a0\u5165\u514d\u8d39\u8ba1\u5212\u9996\u5148\u8981\u901a\u8fc7\u7535\u8bdd\u9a8c\u8bc1\uff0c\u8fd9\u91cc\u6211\u5df2\u7ecf\u8ba4\u8bc1\u8fc7\u4e86\u3002\u4f7f\u7528\u8c37\u6b4c\u865a\u62df\u53f7\u7801\uff0c\u56fd\u5185\u624b\u673a\u53f7\u4e5f\u652f\u6301\u8f93\u5165\uff0c\u4e0d\u8fc7\u6211\u6ca1\u6709\u8bd5\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6657\" title=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/4cb73a97562e417.png\" alt=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" width=\"1459\" height=\"661\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/4cb73a97562e417.png 1459w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/4cb73a97562e417-300x136.png 300w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/4cb73a97562e417-1024x464.png 1024w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/4cb73a97562e417-768x348.png 768w\" sizes=\"auto, (max-width: 1459px) 100vw, 1459px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u627e\u534a\u5929\u514d\u8d39\u5957\u9910\u6709\u4ec0\u4e48\u9650\u5236\uff0c\u4e5f\u6ca1\u627e\u5230\uff0c\u6700\u540e\u53ea\u770b\u5230\u4e00\u4efd\u53ef\u4f7f\u7528\u7684\u6a21\u578b\u578b\u53f7\u9650\u5236\u8bf4\u660e\uff0c\u5982\u4e0b\uff1a<\/p>\n<p><a href=\"https:\/\/www.kdjingpai.com\/pt\/le-chat-mistral\/\">Mistral<\/a> \u63d0\u4f9b\u4e24\u79cd\u7c7b\u578b\u7684\u6a21\u578b\uff1a\u514d\u8d39\u6a21\u578b\u548c\u9ad8\u7ea7\u6a21\u578b\u3002<\/p>\n<div class=\"el-h3\" data-heading=\"Premier models[\u200b](https:\/\/docs.mistral.ai\/getting-started\/models\/#premier-models &quot;Direct link to Premier models&quot;)\" data-tag-name=\"h3\">\n<h3 dir=\"auto\" data-heading=\"Premier models[\u200b](https:\/\/docs.mistral.ai\/getting-started\/models\/#premier-models &quot;Direct link to Premier models&quot;)\">\u9ad8\u7ea7\u6a21\u578b<a class=\"external-link\" title=\"Direct link to Premier models\" href=\"https:\/\/docs.mistral.ai\/getting-started\/models\/#premier-models\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/docs.mistral.ai\/getting-started\/models\/#premier-models\">\u200b<\/a><\/h3>\n<\/div>\n<div class=\"el-table\" dir=\"ltr\" data-tag-name=\"table\">\n<table>\n<thead>\n<tr>\n<th dir=\"ltr\">Model<\/th>\n<th dir=\"ltr\">Weight availability<\/th>\n<th dir=\"ltr\">Available via API<\/th>\n<th dir=\"ltr\">Description<\/th>\n<th dir=\"ltr\">Max <a href=\"https:\/\/www.kdjingpai.com\/pt\/tokenization\/\">Tokens<\/a><\/th>\n<th dir=\"ltr\">API Endpoints<\/th>\n<th dir=\"ltr\">Version<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td dir=\"ltr\">Mistral Large<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\n<a class=\"external-link\" href=\"https:\/\/mistral.ai\/licenses\/MRL-0.1.md\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/licenses\/MRL-0.1.md\">Mistral Research License<\/a><\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our top-tier reasoning model for high-complexity tasks with the lastest version v2 released July 2024. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/mistral-large-2407\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/mistral-large-2407\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">128k<\/td>\n<td dir=\"ltr\"><code>mistral-large-latest<\/code><\/td>\n<td dir=\"auto\">24.07<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Mistral Small<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\n<a class=\"external-link\" href=\"https:\/\/mistral.ai\/licenses\/MRL-0.1.md\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/licenses\/MRL-0.1.md\">Mistral Research License<\/a><\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our latest enterprise-grade small model with the lastest version v2 released September 2024. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/september-24-release\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/september-24-release\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">32k<\/td>\n<td dir=\"ltr\"><code>mistral-small-latest<\/code><\/td>\n<td dir=\"auto\">24.09<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Codestral<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\n<a class=\"external-link\" href=\"https:\/\/mistral.ai\/licenses\/MNPL-0.1.md\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/licenses\/MNPL-0.1.md\">Mistral Non-Production License<\/a><\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our cutting-edge language model for coding released May 2024<\/td>\n<td dir=\"ltr\">32k<\/td>\n<td dir=\"ltr\"><code>codestral-latest<\/code><\/td>\n<td dir=\"auto\">24.05<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Mistral Embed<\/td>\n<td dir=\"auto\"><\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our state-of-the-art semantic for extracting representation of text extracts<\/td>\n<td dir=\"ltr\">8k<\/td>\n<td dir=\"ltr\"><code>mistral-embed<\/code><\/td>\n<td dir=\"auto\">23.12<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"el-h3\" data-heading=\"Free models[\u200b](https:\/\/docs.mistral.ai\/getting-started\/models\/#free-models &quot;Direct link to Free models&quot;)\" data-tag-name=\"h3\">\n<h3 dir=\"auto\" data-heading=\"Free models[\u200b](https:\/\/docs.mistral.ai\/getting-started\/models\/#free-models &quot;Direct link to Free models&quot;)\"><\/h3>\n<h3 dir=\"auto\" data-heading=\"Free models[\u200b](https:\/\/docs.mistral.ai\/getting-started\/models\/#free-models &quot;Direct link to Free models&quot;)\">\u514d\u8d39\u6a21\u578b\u200b<\/h3>\n<\/div>\n<div class=\"el-ul\" data-tag-name=\"ul\">\n<ul class=\"has-list-bullet\">\n<li dir=\"auto\" data-line=\"0\"><strong>\u6700\u65b0\u6a21\u578b<\/strong><\/li>\n<\/ul>\n<\/div>\n<div class=\"el-table\" dir=\"ltr\" data-tag-name=\"table\">\n<table>\n<thead>\n<tr>\n<th dir=\"ltr\">Model<\/th>\n<th dir=\"ltr\">Weight availability<\/th>\n<th dir=\"ltr\">Available via API<\/th>\n<th dir=\"ltr\">Description<\/th>\n<th dir=\"ltr\">Max Tokens<\/th>\n<th dir=\"ltr\">API Endpoints<\/th>\n<th dir=\"ltr\">Version<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td dir=\"ltr\">Pixtral<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">A 12B model with image understanding capabilities in addition to text. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/pixtral-12b\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/pixtral-12b\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">128k<\/td>\n<td dir=\"ltr\"><code>pixtral-12b-2409<\/code><\/td>\n<td dir=\"auto\">24.09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"el-ul\" data-tag-name=\"ul\">\n<ul class=\"has-list-bullet\">\n<li dir=\"auto\" data-line=\"0\"><strong>\u6d4b\u8bd5\u6a21\u578b<\/strong><\/li>\n<\/ul>\n<\/div>\n<div class=\"el-table\" dir=\"ltr\" data-tag-name=\"table\">\n<table>\n<thead>\n<tr>\n<th dir=\"ltr\">Model<\/th>\n<th dir=\"ltr\">Weight availability<\/th>\n<th dir=\"ltr\">Available via API<\/th>\n<th dir=\"ltr\">Description<\/th>\n<th dir=\"ltr\">Max Tokens<\/th>\n<th dir=\"ltr\">API Endpoints<\/th>\n<th dir=\"ltr\">Version<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td dir=\"ltr\">Mistral Nemo<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our best multilingual open source model released July 2024. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/mistral-nemo\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/mistral-nemo\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">128k<\/td>\n<td dir=\"ltr\"><code>open-mistral-nemo<\/code><\/td>\n<td dir=\"auto\">24.07<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Codestral Mamba<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our first mamba 2 open source model released July 2024. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/codestral-mamba\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/codestral-mamba\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">256k<\/td>\n<td dir=\"ltr\"><code>open-codestral-mamba<\/code><\/td>\n<td dir=\"ltr\">v0.1<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Mathstral<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\"><\/td>\n<td dir=\"ltr\">Our first math open source model released July 2024. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/mathstral\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/mathstral\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">32k<\/td>\n<td dir=\"ltr\">NA<\/td>\n<td dir=\"ltr\">v0.1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"el-ul\" data-tag-name=\"ul\">\n<ul class=\"has-list-bullet\">\n<li dir=\"auto\" data-line=\"0\"><strong>\u9648\u65e7\u6a21\u578b<\/strong><\/li>\n<\/ul>\n<\/div>\n<div class=\"el-table\" dir=\"ltr\" data-tag-name=\"table\">\n<table>\n<thead>\n<tr>\n<th dir=\"ltr\">Model<\/th>\n<th dir=\"ltr\">Weight availability<\/th>\n<th dir=\"ltr\">Available via API<\/th>\n<th dir=\"ltr\">Description<\/th>\n<th dir=\"ltr\">Max Tokens<\/th>\n<th dir=\"ltr\">API Endpoints<\/th>\n<th dir=\"ltr\">Version<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td dir=\"ltr\">Mistral 7B<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our first dense model released September 2023. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/announcing-mistral-7b\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/announcing-mistral-7b\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">32k<\/td>\n<td dir=\"ltr\"><code>open-mistral-7b<\/code><\/td>\n<td dir=\"ltr\">v0.3<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Mixtral 8x7B<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our first sparse mixture-of-experts released December 2023. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/mixtral-of-experts\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/mixtral-of-experts\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">32k<\/td>\n<td dir=\"ltr\"><code>open-mixtral-8x7b<\/code><\/td>\n<td dir=\"ltr\">v0.1<\/td>\n<\/tr>\n<tr>\n<td dir=\"ltr\">Mixtral 8x22B<\/td>\n<td dir=\"ltr\">\u2714\ufe0f<br \/>\nApache2<\/td>\n<td dir=\"auto\">\u2714\ufe0f<\/td>\n<td dir=\"ltr\">Our best open source model to date released April 2024. Learn more on our\u00a0<a class=\"external-link\" href=\"https:\/\/mistral.ai\/news\/mixtral-8x22b\/\" target=\"_blank\" rel=\"noopener\" data-tooltip-position=\"top\" aria-label=\"https:\/\/mistral.ai\/news\/mixtral-8x22b\/\">blog post<\/a><\/td>\n<td dir=\"ltr\">64k<\/td>\n<td dir=\"ltr\"><code>open-mixtral-8x22b<\/code><\/td>\n<td dir=\"ltr\">v0.1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u770b\u6765\u514d\u8d39\u7684\u90fd\u53ef\u4ee5\u7528\uff0c\u8bf7\u6c42\u5730\u5740\u683c\u5f0f\uff1ahttps:\/\/api.mistral.ai\/v1\/chat\/completions<\/p>\n<p>\u7136\u540e\u76f4\u63a5\u521b\u5efa\u5bc6\u94a5\u5373\u53ef\u4f7f\u7528\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6658\" title=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b6bddbff6f76565.png\" alt=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" width=\"1767\" height=\"597\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b6bddbff6f76565.png 1767w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b6bddbff6f76565-300x101.png 300w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b6bddbff6f76565-1024x346.png 1024w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b6bddbff6f76565-768x259.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b6bddbff6f76565-1536x519.png 1536w\" sizes=\"auto, (max-width: 1767px) 100vw, 1767px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u6ce8\u610f\uff1a\u4ed6\u4eec\u5bb6 api \u4e0d\u652f\u6301\u60e9\u7f5a\u53c2\u6570\uff0c\u53ef\u4ee5\u641e\u4e2a worker \u5c4f\u853d\u6389\uff0c\u5426\u5219\u5728\u5f88\u591a\u7ec8\u7aef\u4e2d\u53ef\u80fd\u5f02\u5e38\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6659\" title=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/8c4ef28102adb8c.jpg\" alt=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" width=\"440\" height=\"266\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/8c4ef28102adb8c.jpg 440w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/8c4ef28102adb8c-300x181.jpg 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>mistral \u8fc7\u6ee4\u4e0d\u652f\u6301\u5b57\u6bb5 worker \u811a\u672c\uff08\u66f4\u65b0 cors \u8de8\u57df\u5904\u7406\uff09\uff1a<\/p>\n<pre>\/**\r\n* Welcome to Cloudflare Workers! This is your first worker.\r\n*\r\n* - Run \"npm run dev\" in your terminal to start a development server\r\n* - Open a browser tab at http:\/\/localhost:8787\/ to see your worker in action\r\n* - Run \"npm run deploy\" to publish your worker\r\n*\r\n* Learn more at https:\/\/developers.cloudflare.com\/workers\/\r\n*\/\r\n\r\n\r\nexport default {\r\nasync fetch(request, env) {\r\n\/\/ \u5904\u7406\u9884\u68c0\u8bf7\u6c42\r\nif (request.method === 'OPTIONS') {\r\nreturn handleOptions(request);\r\n}\r\n\r\nconst url = new URL(request.url);\r\nurl.host = 'api.mistral.ai';\r\n\r\nlet body;\r\ntry {\r\n\/\/ \u83b7\u53d6 body \u6570\u636e\u5e76\u89e3\u6790\u4e3a JSON\r\nbody = await request.json();\r\n} catch (error) {\r\nreturn new Response('Invalid JSON', { status: 400 });\r\n}\r\n\r\n\/\/ \u5b9a\u4e49\u652f\u6301\u5b57\u6bb5\u5217\u8868\r\nconst allowedFields = ['model', 'messages', 'temperature', 'top_p', 'max_tokens', 'min_tokens', 'stream', 'stop', 'random_seed','response_format','tools','tool_choice','safe_prompt'];\r\n\r\n\/\/ \u8fc7\u6ee4 body \u4e2d\u4e0d\u5728\u652f\u6301\u5b57\u6bb5\u5217\u8868\u4e2d\u7684\u5b57\u6bb5\r\nconst filteredBody = filterFields(body, allowedFields);\r\n\r\nconst newBody = JSON.stringify(filteredBody);\r\nconst modifiedRequest = new Request(url, {\r\nmethod: request.method,\r\nbody: newBody,\r\nheaders: request.headers\r\n});\r\n\r\nreturn fetch(modifiedRequest);\r\n}\r\n}\r\n\/\/ \u8fc7\u6ee4\u4e0d\u652f\u6301\u53c2\u6570\r\nfunction filterFields(obj, allowedFields) {\r\nlet result = {};\r\nfor (const key in obj) {\r\nif (allowedFields.includes(key)) {\r\nresult[key] = obj[key];\r\n}\r\n}\r\nreturn result;\r\n}\r\n\/\/ \u5904\u7406\u9884\u68c0\u8bf7\u6c42\u7684\u51fd\u6570\r\nfunction handleOptions(request) {\r\nconst headers = {\r\n'Access-Control-Allow-Origin': '*', \/\/ \u5141\u8bb8\u6240\u6709\u6765\u6e90\r\n'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', \/\/ \u5141\u8bb8\u7684\u65b9\u6cd5\r\n'Access-Control-Allow-Headers': 'Content-Type, Authorization', \/\/ \u5141\u8bb8\u7684\u5934\u90e8\r\n'Access-Control-Max-Age': '86400', \/\/ \u9884\u68c0\u8bf7\u6c42\u7684\u7f13\u5b58\u65f6\u95f4\uff08\u79d2\uff09\r\n};\r\n\r\nreturn new Response(null, {\r\nstatus: 204,\r\nheaders: headers\r\n});\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>\u514d\u8d39\u7684\u4ee3\u7801\u6a21\u578b\u9700\u8981\u5355\u72ec\u7533\u8bf7\u5bc6\u94a5\u4f7f\u7528<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6660\" title=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/621d679ea29c08f.png\" alt=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" width=\"1779\" height=\"617\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/621d679ea29c08f.png 1779w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/621d679ea29c08f-300x104.png 300w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/621d679ea29c08f-1024x355.png 1024w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/621d679ea29c08f-768x266.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/621d679ea29c08f-1536x533.png 1536w\" sizes=\"auto, (max-width: 1779px) 100vw, 1779px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u867d\u7136\u76ee\u524d\u56fd\u5185\u6709\u5f88\u591a\u4ef7\u683c\u53ca\u4f4e\u3001\u6027\u80fd\u4e5f\u4e0d\u9519\u7684\u6a21\u578b\uff08DeepSeek\uff09\uff0c\u751a\u81f3\u4e5f\u6709\u514d\u8d39\u7684\u5927\u6a21\u578bAPI\uff08\u667a\u8c31\u6e05\u8a00\uff09\u4f46\u514d\u8d39\u4e5f\u8981\u4f18\u4e2d\u9009\u4f18\u561b\u3002<\/p>\n<p>Mistral\u6709\u4e13\u7cbe\u4ee3\u7801\u7684\u6a21\u578bCodestral\uff0c\u4e0a\u9762\u5185\u5bb9\u5df2\u7ecf\u4ecb\u7ecd\uff0cLMSYS \u6392\u540d\u633a\u9ad8\uff0c\u53ef\u4ee5\u63a5\u5165\u5230Cursor\u8bd5\u8bd5\uff0c\u7528\u8d77\u6765\u611f\u89c9\u8fd8\u884c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6661\" title=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/d004d5c317923a5.jpg\" alt=\"\u4e0d\u8981\u5728\u672c\u5730\u90e8\u7f72\u5927\u6a21\u578b\u4e86\uff0cMistral\u4e3a\u5f00\u53d1\u8005\u63a8\u51fa\u514d\u8d39API\u5957\u9910\uff0c\u56fd\u5185\u53ef\u76f4\u8fde\uff01-1\" width=\"1035\" height=\"583\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/d004d5c317923a5.jpg 1035w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/d004d5c317923a5-300x169.jpg 300w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/d004d5c317923a5-1024x577.jpg 1024w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/d004d5c317923a5-768x433.jpg 768w\" sizes=\"auto, (max-width: 1035px) 100vw, 1035px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5207\u52ff\u63a5\u5165ONE-API\uff0c\u7533\u8bf7\u591a\u8d26\u53f7\u4f5c\u4e3a\u4e2d\u8f6c\u670d\u52a1\u8d1f\u8f7d\uff01\u4e00\u662f\u4e0d\u9053\u5fb7\uff0c\u4e8c\u662f\u5c01\u53f7\u3002 &nbsp; MistralAI\u63a8\u51faAPI\u514d\u8d39\u5957\u9910\u5df2\u6709\u51e0\u5929\uff0c\u4e00\u76f4\u72b9\u8c6b\u4e0d\u89c9\u662f\u5426\u53d1\u51fa\u6765\u7684\u539f\u56e0\u662fMistral\u5df2\u7ecf\u591a\u6b21\u5ffd\u60a0\u5f00\u53d1\u8005&#8230;8\u6708\u5e95\u672c\u6765\u8bf49\u6708\u4e0d\u8ba2\u9605\u8ba1\u5212\u5c31&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-6656","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/6656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/comments?post=6656"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/6656\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media?parent=6656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/categories?post=6656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/tags?post=6656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}