TuringToken/dist/assets/index-1wAV706r.js

74 lines
22 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{j as e}from"./semi-ui-fcB3D8nU.js";import{r as g}from"./react-core-C8o2IdY8.js";import{u as f}from"./i18n-DJWjvQyM.js";import{ax as O,aC as I,aP as A,aQ as T,aR as S,aS as C,aT as P,aA as E,aU as v,aV as z,aW as B,aX as G,aY as $,aZ as H,a_ as R,a$ as N,b0 as L,b1 as D,aE as K,aF as F,b2 as Q}from"./index-DApEyau7.js";import"./tools-qobPTha0.js";import"./react-components-KaTRN41W.js";/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],M=O("rocket",q),j=[{id:"overview",icon:I,label:"概述",labelEn:"Overview"},{id:"quickstart",icon:M,label:"快速开始",labelEn:"Quick Start"},{id:"apikey",icon:A,label:"API 密钥",labelEn:"API Keys"},{id:"chat",icon:T,label:"对话补全",labelEn:"Chat Completions"},{id:"image",icon:S,label:"图片生成",labelEn:"Image Generation"},{id:"audio",icon:C,label:"语音 & 音频",labelEn:"Audio & Speech"},{id:"video",icon:P,label:"视频生成",labelEn:"Video Generation"},{id:"models",icon:E,label:"支持模型",labelEn:"Supported Models"},{id:"ratelimit",icon:v,label:"速率限制",labelEn:"Rate Limits"},{id:"faq",icon:z,label:"常见问题",labelEn:"FAQ"}];function b({code:r,lang:a="bash"}){const{t:o}=f(),[n,l]=g.useState(!1),p=()=>{navigator.clipboard.writeText(r),l(!0),setTimeout(()=>l(!1),1500)};return e.jsxs("div",{className:"relative group my-4 rounded-lg overflow-hidden border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[e.jsx("span",{className:"text-xs font-mono text-gray-500 dark:text-gray-400 uppercase",children:a}),e.jsxs("button",{onClick:p,className:"flex items-center gap-1 text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:[n?e.jsx(K,{size:14}):e.jsx(F,{size:14}),o(n?"已复制":"复制")]})]}),e.jsx("pre",{className:"p-4 overflow-x-auto text-sm font-mono text-gray-800 dark:text-gray-200 leading-relaxed",children:e.jsx("code",{children:r})})]})}function x({id:r,icon:a,children:o}){return e.jsxs("h2",{id:r,className:"group flex items-center gap-3 mt-12 mb-5 scroll-mt-[72px]",children:[e.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-lg bg-violet-100 dark:bg-violet-900/30 text-violet-600 dark:text-violet-400",children:e.jsx(a,{size:18})}),e.jsx("span",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o})]})}function h({id:r,children:a,className:o=""}){return e.jsx("h3",{id:r,className:`text-lg font-semibold text-gray-800 dark:text-gray-200 mt-8 mb-3 scroll-mt-[72px] ${o}`,children:a})}function s({children:r,className:a=""}){return e.jsx("p",{className:`text-gray-600 dark:text-gray-400 leading-relaxed mb-4 ${a}`,children:r})}function w({headers:r,rows:a}){return e.jsx("div",{className:"overflow-x-auto my-4 rounded-lg border border-gray-200 dark:border-gray-700",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-gray-50 dark:bg-gray-800/50",children:r.map((o,n)=>e.jsx("th",{className:"px-4 py-3 text-left font-semibold text-gray-700 dark:text-gray-300 border-b border-gray-200 dark:border-gray-700",children:o},n))})}),e.jsx("tbody",{children:a.map((o,n)=>e.jsx("tr",{className:"border-b border-gray-100 dark:border-gray-800 last:border-0 hover:bg-gray-50 dark:hover:bg-gray-800/30 transition-colors",children:o.map((l,p)=>e.jsx("td",{className:"px-4 py-3 text-gray-600 dark:text-gray-400",children:l},p))},n))})]})})}function k({icon:r,title:a,children:o,className:n=""}){return e.jsxs("div",{className:`flex gap-4 p-5 rounded-xl border border-violet-200 dark:border-violet-800 bg-violet-50 dark:bg-violet-900/20 ${n}`,children:[e.jsx("span",{className:"flex-shrink-0 mt-0.5 text-violet-500 dark:text-violet-400",children:e.jsx(r,{size:20})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold text-violet-700 dark:text-violet-300 mb-1",children:a}),e.jsx("div",{className:"text-sm text-violet-600 dark:text-violet-400",children:o})]})]})}function U({contentRef:r,HEADER_OFFSET:a,activeSection:o}){const{t:n}=f(),[l,p]=g.useState([]),[u,y]=g.useState("");g.useEffect(()=>{if(!r.current)return;const t=setTimeout(()=>{const d=r.current.querySelectorAll("h2[id], h3[id]"),i=[];d.forEach(m=>{i.push({id:m.id,text:m.textContent.trim(),level:m.tagName==="H2"?2:3})}),p(i)},100);return()=>clearTimeout(t)},[r,o]),g.useEffect(()=>{if(l.length===0)return;const t=new IntersectionObserver(d=>{for(const i of d)if(i.isIntersecting){y(i.target.id);break}},{rootMargin:`-${a}px 0px -80% 0px`,threshold:0});return l.forEach(d=>{const i=document.getElementById(d.id);i&&t.observe(i)}),()=>t.disconnect()},[l,a]);const c=t=>{const d=document.getElementById(t);if(!d)return;const i=d.getBoundingClientRect().top+window.scrollY-a;window.scrollTo({top:i,behavior:"smooth"})};return l.length===0?null:e.jsx("aside",{className:"hidden xl:block w-[200px] flex-shrink-0",children:e.jsxs("div",{className:"sticky top-[72px] max-h-[calc(100vh-5rem)] overflow-y-auto py-8",children:[e.jsxs("h4",{className:"flex items-center gap-2 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider mb-3 px-1",children:[e.jsx(Q,{size:13}),n("本页目录")]}),e.jsx("nav",{className:"space-y-0.5 border-l border-gray-200 dark:border-gray-700",children:l.map(t=>e.jsx("button",{onClick:()=>c(t.id),className:`block w-full text-left text-sm py-1.5 truncate transition-all duration-150
${t.level===3?"pl-5":"pl-3"}
${u===t.id?"text-violet-600 dark:text-violet-400 font-medium border-l-2 -ml-px border-violet-500":"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-l-2 -ml-px border-transparent"}`,children:t.text},t.id))})]})})}function J(){const{t:r}=f(),[a,o]=g.useState("overview"),[n,l]=g.useState(!1),p=g.useRef(null),u=72;g.useEffect(()=>{const t=new IntersectionObserver(i=>{for(const m of i)if(m.isIntersecting){o(m.target.id);break}},{rootMargin:`-${u}px 0px -70% 0px`,threshold:0});return j.map(i=>i.id).forEach(i=>{const m=document.getElementById(i);m&&t.observe(m)}),()=>t.disconnect()},[]);const y=t=>{l(!1);const d=document.getElementById(t);if(!d)return;const i=d.getBoundingClientRect().top+window.scrollY-u;window.scrollTo({top:i,behavior:"smooth"})},c=window.location.origin;return e.jsxs("div",{className:"min-h-screen bg-white dark:bg-gray-950",children:[e.jsx("header",{className:"sticky top-0 z-40 h-14 border-b border-gray-200 dark:border-gray-800 bg-white/80 dark:bg-gray-950/80 backdrop-blur-md",children:e.jsxs("div",{className:"flex items-center h-full px-4 lg:px-6 max-w-[1400px] mx-auto gap-3",children:[e.jsx("button",{className:"lg:hidden p-2 -ml-2 rounded-md text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>l(!n),children:n?e.jsx(B,{size:20}):e.jsx(G,{size:20})}),e.jsxs("a",{href:"/",className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("img",{src:"/logo.jpg",alt:"logo",className:"w-7 h-7 rounded-full object-cover"}),e.jsx("span",{className:"font-heading text-lg font-bold tracking-tight text-gray-900 dark:text-white",children:"TuringToken"})]}),e.jsx("span",{className:"hidden sm:inline text-sm text-gray-400 dark:text-gray-500",children:"|"}),e.jsx("span",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300",children:r("文档")})]})}),e.jsxs("div",{className:"max-w-[1400px] mx-auto flex",children:[e.jsx("aside",{className:"hidden lg:block w-[240px] flex-shrink-0 sticky top-14 h-[calc(100vh-3.5rem)] overflow-y-auto border-r border-gray-200 dark:border-gray-800 py-6 px-3",children:e.jsx("nav",{className:"space-y-1",children:j.map(t=>e.jsxs("button",{onClick:()=>y(t.id),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-sm transition-all duration-150 text-left
${a===t.id?"bg-violet-50 dark:bg-violet-900/20 text-violet-700 dark:text-violet-300 font-semibold":"text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800/50 hover:text-gray-900 dark:hover:text-white"}`,children:[e.jsx(t.icon,{size:16,className:a===t.id?"text-violet-500":"text-gray-400"}),t.label,a===t.id&&e.jsx($,{size:14,className:"ml-auto text-violet-400"})]},t.id))})}),n&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-black/40 lg:hidden",onClick:()=>l(!1)}),e.jsx("aside",{className:"fixed top-14 left-0 z-50 w-[260px] h-[calc(100vh-3.5rem)] overflow-y-auto bg-white dark:bg-gray-950 border-r border-gray-200 dark:border-gray-800 py-6 px-3 lg:hidden",children:e.jsx("nav",{className:"space-y-1",children:j.map(t=>e.jsxs("button",{onClick:()=>y(t.id),className:`w-full flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm transition-all text-left
${a===t.id?"bg-violet-50 dark:bg-violet-900/20 text-violet-700 dark:text-violet-300 font-semibold":"text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,children:[e.jsx(t.icon,{size:16,className:a===t.id?"text-violet-500":"text-gray-400"}),t.label]},t.id))})})]}),e.jsxs("main",{ref:p,className:"flex-1 min-w-0 py-8 px-6 lg:px-10 xl:px-16 max-w-3xl",children:[e.jsx(x,{id:"overview",icon:I,children:r("概述")}),e.jsxs(s,{children:["TuringToken 是一个统一的 AI API 网关,聚合了",e.jsx("strong",{className:"text-gray-900 dark:text-white",children:" 40+ 主流 AI 提供商"}),"OpenAI、Claude、Gemini、DeepSeek、Qwen 等), 提供与 OpenAI API 完全兼容的接口格式。一次接入,即可访问所有模型,无需分别对接各个厂商。"]}),e.jsx("div",{className:"grid sm:grid-cols-2 gap-4 mt-6 mb-8",children:[{icon:H,title:"统一接口",desc:"与 OpenAI API 格式完全兼容,零改造迁移"},{icon:R,title:"多供应商聚合",desc:"一站式接入 40+ AI 厂商,按需切换"},{icon:N,title:"安全可靠",desc:"API 密钥管理、速率限制、访问控制"},{icon:L,title:"按量计费",desc:"按 Token 用量计费,灵活成本控制"}].map((t,d)=>e.jsxs("div",{className:"flex gap-3 p-4 rounded-xl border border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50",children:[e.jsx("span",{className:"flex-shrink-0 text-violet-500 dark:text-violet-400",children:e.jsx(t.icon,{size:20})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white mb-1",children:t.title}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t.desc})]})]},d))}),e.jsx(x,{id:"quickstart",icon:M,children:r("快速开始")}),e.jsx(s,{children:"只需三步,即可接入 AI 能力:"}),e.jsxs("div",{className:"space-y-6 mt-6",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx("span",{className:"flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-full bg-violet-500 text-white text-sm font-bold",children:"1"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-1",children:r("注册账号")}),e.jsxs(s,{className:"!mb-0",children:["访问 ",e.jsx("a",{href:"/register",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"注册页面"})," 创建 TuringToken 账号。"]})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("span",{className:"flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-full bg-violet-500 text-white text-sm font-bold",children:"2"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-1",children:r("创建 API 密钥")}),e.jsxs(s,{className:"!mb-0",children:["进入 ",e.jsx("a",{href:"/console/token",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"控制台 → API Key"}),',点击"新建"生成密钥。']})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("span",{className:"flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-full bg-violet-500 text-white text-sm font-bold",children:"3"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-1",children:r("发送请求")}),e.jsx(s,{className:"!mb-0",children:"使用下方示例代码,将 Base URL 替换为 TuringToken 地址即可。"})]})]})]}),e.jsx(k,{icon:D,title:"Base URL",className:"mt-6",children:e.jsxs("code",{className:"font-mono text-sm bg-violet-100 dark:bg-violet-900/40 px-2 py-0.5 rounded",children:[c,"/v1"]})}),e.jsx(x,{id:"apikey",icon:A,children:r("API 密钥")}),e.jsx(s,{children:"API 密钥是与 TuringToken 通信的凭证。每个密钥可以设置额度上限、有效期和 IP 白名单。"}),e.jsx(h,{id:"apikey-create",children:"创建密钥"}),e.jsxs(s,{children:["登录后进入 ",e.jsx("a",{href:"/console/token",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"控制台 → API Key"}),' 点击"新建 API Key",填写名称后即可生成。请务必妥善保存密钥,关闭页面后将无法再次查看完整密钥。']}),e.jsx(h,{id:"apikey-usage",children:"使用密钥"}),e.jsx(s,{children:"在所有 API 请求中,通过 Bearer Token 方式传递密钥:"}),e.jsx(b,{lang:"http",code:"Authorization: Bearer sk-your-api-key-here"}),e.jsx(k,{icon:N,title:"安全提醒",children:"请勿将 API 密钥硬编码在前端代码或公开仓库中。建议使用环境变量或后端代理方式管理密钥。"}),e.jsx(x,{id:"chat",icon:T,children:r("对话补全")}),e.jsx(s,{children:"对话补全是最常用的 API 接口,支持多轮对话、流式输出和 Function Calling。 兼容 OpenAI Chat Completions API 格式。"}),e.jsx(h,{id:"chat-basic",children:"基础请求"}),e.jsx(b,{lang:"bash",code:`curl ${c}/v1/chat/completions \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer sk-your-api-key" \\
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "你是一个有用的AI助手。"},
{"role": "user", "content": "你好,请介绍一下你自己。"}
]
}'`}),e.jsx(h,{id:"chat-stream",children:"流式输出"}),e.jsxs(s,{children:["设置 ",e.jsx("code",{className:"font-mono text-sm bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-violet-600 dark:text-violet-400",children:"stream: true"})," 即可启用 SSE 流式响应:"]}),e.jsx(b,{lang:"bash",code:`curl ${c}/v1/chat/completions \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer sk-your-api-key" \\
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "写一首关于春天的诗"}],
"stream": true
}'`}),e.jsx(h,{children:"Python SDK 示例"}),e.jsx(b,{lang:"python",code:`from openai import OpenAI
client = OpenAI(
base_url="${c}/v1",
api_key="sk-your-api-key",
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "user", "content": "你好,请介绍一下你自己。"}
],
)
print(response.choices[0].message.content)`}),e.jsx(h,{id:"chat-nodejs",children:"Node.js SDK 示例"}),e.jsx(b,{lang:"javascript",code:`import OpenAI from 'openai';
const client = new OpenAI({
baseURL: '${c}/v1',
apiKey: 'sk-your-api-key',
});
const completion = await client.chat.completions.create({
model: 'gpt-4o',
messages: [
{ role: 'user', content: '你好,请介绍一下你自己。' }
],
});
console.log(completion.choices[0].message.content);`}),e.jsx(x,{id:"image",icon:S,children:r("图片生成")}),e.jsx(s,{children:"支持 DALL·E、Stable Diffusion 等多种图片生成模型,兼容 OpenAI Images API 格式。"}),e.jsx(h,{children:"生成图片"}),e.jsx(b,{lang:"bash",code:`curl ${c}/v1/images/generations \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer sk-your-api-key" \\
-d '{
"model": "dall-e-3",
"prompt": "一只正在敲代码的可爱猫咪,赛博朋克风格",
"n": 1,
"size": "1024x1024"
}'`}),e.jsx(x,{id:"audio",icon:C,children:r("语音 & 音频")}),e.jsx(s,{children:"支持语音转文字STT和文字转语音TTS兼容 OpenAI Audio API 格式。"}),e.jsx(h,{id:"audio-stt",children:"语音转文字 (STT)"}),e.jsx(b,{lang:"bash",code:`curl ${c}/v1/audio/transcriptions \\
-H "Authorization: Bearer sk-your-api-key" \\
-F "file=@audio.mp3" \\
-F "model=whisper-1"`}),e.jsx(h,{id:"audio-tts",children:"文字转语音 (TTS)"}),e.jsx(b,{lang:"bash",code:`curl ${c}/v1/audio/speech \\
-H "Authorization: Bearer sk-your-api-key" \\
-H "Content-Type: application/json" \\
-d '{
"model": "tts-1",
"input": "你好,欢迎使用 TuringToken",
"voice": "alloy"
}' \\
--output speech.mp3`}),e.jsx(x,{id:"video",icon:P,children:r("视频生成")}),e.jsx(s,{children:"TuringToken 集成了多家视频生成厂商可灵、即梦、Vidu、Sora 等), 支持文生视频和图生视频能力。"}),e.jsxs(s,{children:["视频生成接口因厂商而异,详细参数请参考 ",e.jsx("a",{href:"/pricing",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"模型列表"})," 中各视频模型的说明, 或访问 ",e.jsx("a",{href:"/console",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"控制台"})," 在线体验。"]}),e.jsx(x,{id:"models",icon:E,children:r("支持模型")}),e.jsx(s,{children:"TuringToken 聚合了以下主流 AI 模型的 API 访问:"}),e.jsx(w,{headers:["供应商","代表模型","能力"],rows:[["OpenAI","GPT-4o, GPT-4o-mini, o3, o4-mini","对话、推理、视觉"],["Anthropic","Claude 3.5 Sonnet, Claude 3 Opus, Claude 4","对话、长文本"],["Google","Gemini 2.5 Pro, Gemini 2.5 Flash","对话、多模态"],["DeepSeek","DeepSeek-V3, DeepSeek-R1","对话、推理"],["阿里巴巴","Qwen3, Qwen-Max, Qwen-Plus","对话、视觉"],["智谱","GLM-4-Plus, GLM-4-Flash","对话、工具调用"],["Moonshot","Kimi-K2, Moonshot-v1","对话、长文本"],["字节跳动","Doubao-Pro, Seedance","对话、视频"],["MiniMax","abab6.5s, MiniMax-M1","对话"],["Mistral","Mistral Large, Mixtral 8x22B","对话、开源"],["xAI","Grok-3, Grok-2","对话"],["Cohere","Command R+, Command R","对话、RAG"],["Meta","Llama 4, Llama 3.3 70B","对话、开源"],["百度","ERNIE-4.0, ERNIE-Speed","对话"],["讯飞","Spark 4.0 Ultra","对话"],["腾讯","Hunyuan-Pro, Hunyuan-Turbo","对话"]]}),e.jsxs(s,{className:"mt-4",children:["查看 ",e.jsx("a",{href:"/pricing",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"完整模型列表和定价 →"})]}),e.jsx(x,{id:"ratelimit",icon:v,children:r("速率限制")}),e.jsx(s,{children:"为确保服务稳定性TuringToken 对不同用户类型设置了速率限制:"}),e.jsx(w,{headers:["用户类型","请求频率","并发连接","每日限额"],rows:[["免费用户","30 次/分钟","5","500 次/天"],["基础用户","120 次/分钟","10","5000 次/天"],["专业用户","600 次/分钟","30","50000 次/天"],["企业用户","3000 次/分钟","100","无限制"]]}),e.jsx(k,{icon:v,title:"提示",className:"mt-6",children:"具体限制以控制台中实际配置为准。管理员可在后台自定义速率限制策略。超出限制时 API 将返回 HTTP 429 状态码。"}),e.jsx(x,{id:"faq",icon:z,children:r("常见问题")}),e.jsxs("div",{className:"space-y-6 mt-6",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-2",children:"TuringToken 与直接使用 OpenAI API 有什么区别?"}),e.jsx(s,{children:"TuringToken 提供与 OpenAI 完全兼容的接口,但同时聚合了 40+ 其他 AI 厂商的模型。 您无需分别对接每个厂商,一键切换模型,按量统一计费。"})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-2",children:"如何切换不同的 AI 模型?"}),e.jsxs(s,{children:["只需在请求中修改 ",e.jsx("code",{className:"font-mono text-sm bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-violet-600 dark:text-violet-400",children:"model"})," 参数即可,接口格式完全一致。 例如将 ",e.jsx("code",{className:"font-mono text-sm bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded",children:"gpt-4o"})," 替换为 ",e.jsx("code",{className:"font-mono text-sm bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded",children:"claude-3-5-sonnet-20241022"}),"。"]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-2",children:"支持流式响应 (Streaming) 吗?"}),e.jsxs(s,{children:["支持。设置 ",e.jsx("code",{className:"font-mono text-sm bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-violet-600 dark:text-violet-400",children:"stream: true"})," 即可启用 SSE 流式输出,所有模型均支持。"]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-2",children:"支持 Function Calling / Tool Use 吗?"}),e.jsx(s,{children:"支持。GPT-4o、Claude、Gemini、Qwen、DeepSeek 等模型均支持 Function Calling可用于构建 Agent 和工具调用场景。"})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-2",children:"如何查看我的 API 使用量和消费明细?"}),e.jsxs(s,{children:["登录后进入 ",e.jsx("a",{href:"/console",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"控制台"}),",可在仪表盘查看实时用量统计和消费明细。"]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-2",children:"密钥泄露了怎么办?"}),e.jsxs(s,{children:["立即前往 ",e.jsx("a",{href:"/console/token",className:"text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"控制台 → API Key"})," 删除泄露的密钥,并创建新密钥。"]})]})]}),e.jsx("div",{className:"mt-20 pt-8 border-t border-gray-200 dark:border-gray-800",children:e.jsx(s,{className:"text-center text-sm text-gray-400 !mb-0",children:"更多问题?请联系我们的技术支持团队获取帮助。"})})]}),e.jsx(U,{contentRef:p,HEADER_OFFSET:u,activeSection:a})]})]})}export{J as default};