[{"data":1,"prerenderedAt":178},["ShallowReactive",2],{"docs-en-/en/docs/service/ai/custom":3},{"id":4,"title":5,"body":6,"description":170,"extension":171,"meta":172,"navigation":173,"path":174,"seo":175,"stem":176,"__hash__":177},"docs/en/docs/service/ai/custom.md","Custom Translation Services",{"type":7,"value":8,"toc":163},"minimark",[9,13,22,27,34,41,45,48,89,93,96,115,121,125,128,139,157],[10,11,5],"h1",{"id":12},"custom-translation-services",[14,15,16,17,21],"p",{},"For AI providers that do not appear in the built-in service list, Doco Translate lets you add a ",[18,19,20],"strong",{},"custom service"," and connect it for translation.",[23,24,26],"h2",{"id":25},"add-a-custom-service","Add a Custom Service",[14,28,29,30,33],{},"Open the Doco Translate Settings → Services panel. Click ",[18,31,32],{},"Add Custom Service"," below the service list, enter a service name, and choose an API protocol.",[14,35,36],{},[37,38],"img",{"alt":39,"src":40},"Adding a custom translation service","/images/docs/custom-service-form.webp",[23,42,44],{"id":43},"api-protocols","API Protocols",[14,46,47],{},"Doco Translate supports five common AI API protocols:",[49,50,51,61,68,75,82],"ol",{},[52,53,54],"li",{},[55,56,60],"a",{"href":57,"rel":58},"https://platform.openai.com/docs/api-reference/chat/create",[59],"nofollow","OpenAI protocol (Chat Completions)",[52,62,63],{},[55,64,67],{"href":65,"rel":66},"https://platform.claude.com/docs/en/api/messages/create",[59],"Anthropic protocol (Responses)",[52,69,70],{},[55,71,74],{"href":72,"rel":73},"https://ai.google.dev/api",[59],"Gemini protocol",[52,76,77],{},[55,78,81],{"href":79,"rel":80},"https://docs.ollama.com/api/chat",[59],"Ollama protocol",[52,83,84],{},[55,85,88],{"href":86,"rel":87},"https://lmstudio.ai/docs/developer/rest/chat",[59],"LM Studio protocol",[23,90,92],{"id":91},"custom-request-parameters","Custom Request Parameters",[14,94,95],{},"Doco Translate supports the following custom request settings:",[97,98,99,102,105,112],"ul",{},[52,100,101],{},"API host: useful when switching between standard APIs and Coding Plan endpoints",[52,103,104],{},"API path: use a non-standard path supplied by a third-party provider",[52,106,107,108,111],{},"Request body parameters: configure options such as ",[18,109,110],{},"disabling reasoning",", which is recommended for translation",[52,113,114],{},"Request headers: use additional headers in special cases",[14,116,117],{},[37,118],{"alt":119,"src":120},"Configuring custom request parameters","/images/docs/custom-request-parameters.webp",[23,122,124],{"id":123},"custom-prompt","Custom Prompt",[14,126,127],{},"Doco Translate includes this default prompt:",[129,130,135],"pre",{"className":131,"code":133,"language":134},[132],"language-text","Translate the input text into {{TARGET_LANGUAGE}}.\n\nINPUT:\n{{TEXT}}\n","text",[136,137,133],"code",{"__ignoreMap":138},"",[14,140,141,142,145,146,149,150,145,153,156],{},"Click Edit Prompt to change the prompt and adjust the model's translation style or output. Keep the ",[136,143,144],{},"{{TARGET_LANGUAGE}}"," and ",[136,147,148],{},"{{TEXT}}"," placeholders because Doco Translate replaces them with the ",[18,151,152],{},"target language",[18,154,155],{},"input text",".",[14,158,159],{},[37,160],{"alt":161,"src":162},"Editing a custom prompt","/images/docs/custom-prompt.webp",{"title":138,"searchDepth":164,"depth":164,"links":165},2,[166,167,168,169],{"id":25,"depth":164,"text":26},{"id":43,"depth":164,"text":44},{"id":91,"depth":164,"text":92},{"id":123,"depth":164,"text":124},"Add AI providers that are not built in and configure their request parameters and prompts.","md",{},true,"/en/docs/service/ai/custom",{"title":5,"description":170},"en/docs/service/ai/custom","iDpW7LK0ndmN5T9LV6CYkqNEuyWcDGE0BQ2FmbBNiMM",1787207634220]