[{"data":1,"prerenderedAt":172},["ShallowReactive",2],{"docs-zh-/zh/docs/service/ai/custom":3},{"id":4,"title":5,"body":6,"description":164,"extension":165,"meta":166,"navigation":167,"path":168,"seo":169,"stem":170,"__hash__":171},"docs_zh/zh/docs/service/ai/custom.md","自定义翻译服务",{"type":7,"value":8,"toc":157},"minimark",[9,12,21,25,31,38,41,44,85,88,91,110,116,119,122,133,151],[10,11,5],"h1",{"id":5},[13,14,15,16,20],"p",{},"对于不在内置服务列表中的 AI 服务，Doco Translate 支持通过添加 ",[17,18,19],"strong",{},"自定义服务"," 的方式接入其他 AI 大模型服务提供商进行翻译",[22,23,24],"h2",{"id":24},"添加自定义服务",[13,26,27,28,30],{},"进入 Doco Translate 设置-服务 面板，左侧服务列表的下方，点击 ",[17,29,24],{}," 按钮，打开自定义服务面板，输入服务名，选择 API 接口协议，即可快速添加自定服务",[13,32,33],{},[34,35],"img",{"alt":36,"src":37},"添加自定义翻译服务","/images/docs/custom-service-form.webp",[22,39,40],{"id":40},"接口协议",[13,42,43],{},"Doco Translate 支持 5 种主流的 AI 接口协议",[45,46,47,57,64,71,78],"ol",{},[48,49,50],"li",{},[51,52,56],"a",{"href":53,"rel":54},"https://platform.openai.com/docs/api-reference/chat/create",[55],"nofollow","OpenAI 协议（ChatCompletion）",[48,58,59],{},[51,60,63],{"href":61,"rel":62},"https://platform.claude.com/docs/en/api/messages/create",[55],"Anthropic 协议（Response）",[48,65,66],{},[51,67,70],{"href":68,"rel":69},"https://ai.google.dev/api",[55],"Gemini 协议",[48,72,73],{},[51,74,77],{"href":75,"rel":76},"https://docs.ollama.com/api/chat",[55],"Ollama 协议",[48,79,80],{},[51,81,84],{"href":82,"rel":83},"https://lmstudio.ai/docs/developer/rest/chat",[55],"LM Studio 协议",[22,86,87],{"id":87},"自定义请求参数",[13,89,90],{},"Doco Translate 支持自定义请求参数设置，支持设置：",[92,93,94,97,100,107],"ul",{},[48,95,96],{},"接口 Host：切换 API 接口和 Coding Plan 接口时使用",[48,98,99],{},"接口路径：第三方服务提供商提供非标准接口路径时可自行设置",[48,101,102,103,106],{},"请求体参数：",[17,104,105],{},"禁用思考"," 相关参数可在此设置，建议翻译场景中禁用思考",[48,108,109],{},"请求头参数：特殊场景下使用",[13,111,112],{},[34,113],{"alt":114,"src":115},"配置自定义请求参数","/images/docs/custom-request-parameters.webp",[22,117,118],{"id":118},"自定义提示词",[13,120,121],{},"Doco Translate 内置默认提示词",[123,124,129],"pre",{"className":125,"code":127,"language":128},[126],"language-text","Translate the input text into {{TARGET_LANGUAGE}}.\n\nINPUT:\n{{TEXT}}\n","text",[130,131,127],"code",{"__ignoreMap":132},"",[13,134,135,136,139,140,143,144,139,147,150],{},"点击编辑提示词按钮，即可自定义编辑翻译提示词，用于调整 AI 大模型翻译的输出风格与效果，其中 ",[130,137,138],{},"{{TARGET_LANGUAGE}}"," 和 ",[130,141,142],{},"{{TEXT}}"," 为 ",[17,145,146],{},"目标语言",[17,148,149],{},"输入文本"," 的替换占位符，需要保留",[13,152,153],{},[34,154],{"alt":155,"src":156},"编辑自定义提示词","/images/docs/custom-prompt.webp",{"title":132,"searchDepth":158,"depth":158,"links":159},2,[160,161,162,163],{"id":24,"depth":158,"text":24},{"id":40,"depth":158,"text":40},{"id":87,"depth":158,"text":87},{"id":118,"depth":158,"text":118},"添加内置列表之外的 AI 服务，并配置请求参数与自定义提示词。","md",{},true,"/zh/docs/service/ai/custom",{"title":5,"description":164},"zh/docs/service/ai/custom","x90AhhMhA4vgBAbEJjhO5JGlMJURbfXv4IhaMwADoWQ",1787207636142]