# 自定义 GPT 翻译 Prompt

HapiGo 翻译的 GPT 翻译服务支持自定义 Prompt，大家可以根据自己的需要打造自己的 AI 工具。

打开设置，进入扩展设置-翻译。在翻译服务设置里双击编辑已有 GPT 服务，或点击右边 + 按钮添加。对于有多种场景需求的，可以添加多个服务。

<figure><img src="/files/NAyjIlXwbiKts0RBwqnb" alt=""><figcaption></figcaption></figure>

自定义 GPT 服务一共有 3 项编辑框（如果是自带 API key 的用户，还需要填入 API key）：

1. 名称：翻译面板中服务的显示名称
2. 角色描述：AI 的角色描述可以有效的聚焦专业领域，会让 AI 的回复更加精准
3. Prompt 提示词：Prompt 是直接的命令语句，可以控制 AI 的返回结果。在此处，一共支持 3 个变量：{text}、{fromLang}、{toLang}。分别为：获取的原文本、原文的语言、翻译目标语言。对于非翻译的使用场景，可以只使用 {text}。

我们提供了几种基础模版，大家可以根据自己的需求进行修改。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-cn.hapigo.com/extention/translate/gpt_prompt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
